home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Controls.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  92.7 KB  |  2,129 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Controls.p
  3.  
  4.      Contains:    Control Manager interfaces
  5.  
  6.      Version:    Technology:    Mac OS 8.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT Controls;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __CONTROLS__}
  27. {$SETC __CONTROLS__ := 1}
  28.  
  29. {$I+}
  30. {$SETC ControlsIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __QUICKDRAW__}
  37. {$I Quickdraw.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __MENUS__}
  40. {$I Menus.p}
  41. {$ENDC}
  42. {$IFC UNDEFINED __TEXTEDIT__}
  43. {$I TextEdit.p}
  44. {$ENDC}
  45. {$IFC UNDEFINED __DRAG__}
  46. {$I Drag.p}
  47. {$ENDC}
  48. {$IFC UNDEFINED __ICONS__}
  49. {$I Icons.p}
  50. {$ENDC}
  51.  
  52.  
  53. {$PUSH}
  54. {$ALIGN MAC68K}
  55. {$LibExport+}
  56.  
  57.  
  58. CONST
  59.     _ControlDispatch            = $AA73;
  60.  
  61. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  62. {    • Gestalt                                                                                            }
  63. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  64.     gestaltControlMgrAttr        = 'cntl';
  65.     gestaltControlMgrPresent    = $00000001;
  66.  
  67. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  68. {    • Resource Types                                                                                    }
  69. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  70.     kControlDefProcType            = 'CDEF';
  71.     kControlTemplateResourceType = 'CNTL';
  72.     kControlColorTableResourceType = 'cctb';
  73.     kControlDefProcResourceType    = 'CDEF';
  74.     kControlTabListResType        = 'tab#';                        {  used for tab control (Appearance 1.0 and later) }
  75.     kControlListDescResType        = 'ldes';                        {  used for list box control (Appearance 1.0 and later) }
  76.  
  77. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  78. {    • Format of a ‘CNTL’ resource                                                                        }
  79. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  80.  
  81. TYPE
  82.     ControlTemplatePtr = ^ControlTemplate;
  83.     ControlTemplate = RECORD
  84.         controlRect:            Rect;
  85.         controlValue:            SInt16;
  86.         controlVisible:            BOOLEAN;
  87.         fill:                    SInt8;
  88.         controlMaximum:            SInt16;
  89.         controlMinimum:            SInt16;
  90.         controlDefProcID:        SInt16;
  91.         controlReference:        SInt32;
  92.         controlTitle:            Str255;
  93.     END;
  94.  
  95.     ControlTemplateHandle                = ^ControlTemplatePtr;
  96.  
  97.  
  98. {$IFC NOT TARGET_OS_MAC }
  99. {
  100.   —————————————————————————————————————————————————————————————————————————————————————————————————————————
  101.    • NON-MAC COMPATIBILITY CODES (QuickTime 3.0)
  102.   —————————————————————————————————————————————————————————————————————————————————————————————————————————
  103. }
  104.     ControlNotification                    = UInt32;
  105.  
  106. CONST
  107.     controlNotifyNothing        = 'nada';                        {  No (null) notification }
  108.     controlNotifyClick            = 'clik';                        {  Control was clicked }
  109.     controlNotifyFocus            = 'focu';                        {  Control got keyboard focus }
  110.     controlNotifyKey            = 'key ';                        {  Control got a keypress }
  111.  
  112.  
  113. TYPE
  114.     ControlCapabilities                    = UInt32;
  115.  
  116. CONST
  117.     kControlCanAutoInvalidate    = $00000001;                    {  Control component automatically invalidates areas left behind after hide/move operation. }
  118.  
  119. {  procID's for our added "controls" }
  120.     staticTextProc                = 256;                            {  static text }
  121.     editTextProc                = 272;                            {  editable text }
  122.     iconProc                    = 288;                            {  icon }
  123.     userItemProc                = 304;                            {  user drawn item }
  124.     pictItemProc                = 320;                            {  pict }
  125.  
  126. {$ENDC}
  127.  
  128. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  129. {    • ControlHandle                                                                                        }
  130. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  131.  
  132. TYPE
  133.     ControlRecordPtr = ^ControlRecord;
  134.     ControlPtr                            = ^ControlRecord;
  135.     ControlHandle                        = ^ControlPtr;
  136. {  ControlRef is obsolete. Use ControlHandle. }
  137.     ControlRef                            = ControlHandle;
  138.     ControlPartCode                        = SInt16;
  139. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  140. { • Control ActionProcPtr                                                                                }
  141. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  142. {$IFC TYPED_FUNCTION_POINTERS}
  143.     ControlActionProcPtr = PROCEDURE(theControl: ControlHandle; partCode: ControlPartCode);
  144. {$ELSEC}
  145.     ControlActionProcPtr = ProcPtr;
  146. {$ENDC}
  147.  
  148.     ControlActionUPP = UniversalProcPtr;
  149. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  150. {    • ControlRecord                                                                                        }
  151. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  152.     ControlRecord = PACKED RECORD
  153.         nextControl:            ControlHandle;
  154.         contrlOwner:            WindowPtr;
  155.         contrlRect:                Rect;
  156.         contrlVis:                UInt8;
  157.         contrlHilite:            UInt8;
  158.         contrlValue:            SInt16;
  159.         contrlMin:                SInt16;
  160.         contrlMax:                SInt16;
  161.         contrlDefProc:            Handle;
  162.         contrlData:                Handle;
  163.         contrlAction:            ControlActionUPP;
  164.         contrlRfCon:            SInt32;
  165.         contrlTitle:            Str255;
  166.     END;
  167.  
  168. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  169. { • Control ActionProcPtr : Epilogue                                                                    }
  170. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  171.  
  172. CONST
  173.     uppControlActionProcInfo = $000002C0;
  174.  
  175. FUNCTION NewControlActionProc(userRoutine: ControlActionProcPtr): ControlActionUPP;
  176.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  177.     INLINE $2E9F;
  178.     {$ENDC}
  179.  
  180. PROCEDURE CallControlActionProc(theControl: ControlHandle; partCode: ControlPartCode; userRoutine: ControlActionUPP);
  181.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  182.     INLINE $205F, $4E90;
  183.     {$ENDC}
  184. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  185. {    • Control Color Table                                                                                }
  186. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  187.  
  188. CONST
  189.     cFrameColor                    = 0;
  190.     cBodyColor                    = 1;
  191.     cTextColor                    = 2;
  192.     cThumbColor                    = 3;
  193.     kNumberCtlCTabEntries        = 4;
  194.  
  195.  
  196. TYPE
  197.     CtlCTabPtr = ^CtlCTab;
  198.     CtlCTab = RECORD
  199.         ccSeed:                    SInt32;
  200.         ccRider:                SInt16;
  201.         ctSize:                    SInt16;
  202.         ctTable:                ARRAY [0..3] OF ColorSpec;
  203.     END;
  204.  
  205.     CCTabPtr                            = ^CtlCTab;
  206.     CCTabHandle                            = ^CCTabPtr;
  207. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  208. {    • Auxiliary Control Record                                                                            }
  209. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  210.     AuxCtlRecPtr = ^AuxCtlRec;
  211.     AuxCtlRec = RECORD
  212.         acNext:                    Handle;
  213.         acOwner:                ControlHandle;
  214.         acCTable:                CCTabHandle;
  215.         acFlags:                SInt16;
  216.         acReserved:                SInt32;
  217.         acRefCon:                SInt32;
  218.     END;
  219.  
  220.     AuxCtlPtr                            = ^AuxCtlRec;
  221.     AuxCtlHandle                        = ^AuxCtlPtr;
  222. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  223. {    • PopUp Menu Private Data Structure                                                                    }
  224. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  225.     PopupPrivateDataPtr = ^PopupPrivateData;
  226.     PopupPrivateData = RECORD
  227.         mHandle:                MenuHandle;
  228.         mID:                    SInt16;
  229.     END;
  230.  
  231.     PopupPrivateDataHandle                = ^PopupPrivateDataPtr;
  232.  
  233. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  234. {    • Errors are in the range -30580 .. -30599                                                            }
  235. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  236.  
  237. CONST
  238.     errMessageNotSupported        = -30580;
  239.     errDataNotSupported            = -30581;
  240.     errControlDoesntSupportFocus = -30582;
  241.     errWindowDoesntSupportFocus    = -30583;
  242.     errUnknownControl            = -30584;
  243.     errCouldntSetFocus            = -30585;
  244.     errNoRootControl            = -30586;
  245.     errRootAlreadyExists        = -30587;
  246.     errInvalidPartCode            = -30588;
  247.     errControlsAlreadyExist        = -30589;
  248.     errControlIsNotEmbedder        = -30590;
  249.     errDataSizeMismatch            = -30591;
  250.     errControlHiddenOrDisabled    = -30592;
  251.     errWindowRegionCodeInvalid    = -30593;
  252.     errCantEmbedIntoSelf        = -30594;
  253.     errCantEmbedRoot            = -30595;
  254.     errItemNotControl            = -30596;
  255.     controlInvalidDataVersionErr = -30597;
  256.     controlPropertyInvalid        = -5603;
  257.     controlPropertyNotFoundErr    = -5604;
  258.     controlHandleInvalidErr        = -30599;
  259.  
  260. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  261. {    • Control Definition ID’s                                                                            }
  262. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  263. {  Standard System 7 procIDs }
  264.  
  265.     pushButProc                    = 0;
  266.     checkBoxProc                = 1;
  267.     radioButProc                = 2;
  268.     scrollBarProc                = 16;
  269.     popupMenuProc                = 1008;
  270.  
  271.  
  272. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  273. {    • Control Types and ID’s available only with Appearance 1.0 and later                                }
  274. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  275.  
  276.     kControlSupportsNewMessages    = ' ok ';                        {  CDEF should return as result of kControlMsgTestNewMsgSupport }
  277.  
  278. { focusing part codes }
  279.     kControlFocusNoPart            = 0;                            {  tells control to clear its focus }
  280.     kControlFocusNextPart        = -1;                            {  tells control to focus on the next part }
  281.     kControlFocusPrevPart        = -2;                            {  tells control to focus on the previous part }
  282.  
  283.  
  284. TYPE
  285.     ControlFocusPart                    = SInt16;
  286. { Use this constant in Get/SetControlData when the data referred to is not            }
  287. { specific to a part, but rather the entire control, e.g. the list handle of a     }
  288. { list box control.                                                                }
  289.  
  290. CONST
  291.     kControlEntireControl        = 0;
  292.  
  293. { Key Filter result codes                                                             }
  294. {                                                                                    }
  295. { Certain controls can have a keyfilter attached to them. The filter proc should    }
  296. { return one of the two constants below. If kKeyFilterBlockKey is returned, the    }
  297. { key is blocked and never makes it to the control. If kKeyFilterPassKey is        }
  298. { returned, the control receives the keystroke.                                    }
  299.     kControlKeyFilterBlockKey    = 0;
  300.     kControlKeyFilterPassKey    = 1;
  301.  
  302.  
  303. TYPE
  304.     ControlKeyFilterResult                = SInt16;
  305. { ControlKeyScriptBehavior                                                            }
  306. {                                                                                    }
  307. { These are the values you can use with kControlEditTextKeyScriptBehaviorTag on an }
  308. { Edit Text control.                                                                }
  309. { The default for password fields is kControlKeyScriptBehaviorPrefersRoman, while    }
  310. { non password fields default to kControlKeyScriptBehaviorAllowAnyScript.            }
  311.  
  312. CONST
  313.     kControlKeyScriptBehaviorAllowAnyScript = 'any ';            {  leaves the current keyboard alone and allows user to change the keyboard. }
  314.     kControlKeyScriptBehaviorPrefersRoman = 'prmn';                {  switches the keyboard to roman, but allows them to change it as desired. }
  315.     kControlKeyScriptBehaviorRequiresRoman = 'rrmn';            {  switches the keyboard to roman and prevents the user from changing it. }
  316.  
  317.  
  318. TYPE
  319.     ControlKeyScriptBehavior            = UInt32;
  320. {——————————————————————————————————————————————————————————————————————————————————————}
  321. {     SPECIAL FONT USAGE NOTES: You can specify the font to use for many control types.
  322.     The constants below are meta-font numbers which you can use to set a particular
  323.     control's font usage. There are essentially two modes you can use: 1) default,
  324.     which is essentially the same as it always has been, i.e. it uses the system font, unless
  325.     directed to use the window font via a control variant. 2) you can specify to use
  326.     the big or small system font in a generic manner. The Big system font is the font
  327.     used in menus, etc. Chicago has filled that role for some time now. Small system
  328.     font is currently Geneva 10. The meta-font number implies the size and style.
  329.  
  330.     NOTE:        Not all font attributes are used by all controls. Most, in fact, ignore
  331.                 the fore and back color (Static Text is the only one that does, for
  332.                 backwards compatibility). Also size, face, and addFontSize are ignored
  333.                 when using the meta-font numbering.
  334. }
  335. {——————————————————————————————————————————————————————————————————————————————————————}
  336.  
  337. CONST
  338.                                                                 {  Meta-font numbering - see not above  }
  339.     kControlFontBigSystemFont    = -1;                            {  force to big system font }
  340.     kControlFontSmallSystemFont    = -2;                            {  force to small system font }
  341.     kControlFontSmallBoldSystemFont = -3;                        {  force to small bold system font }
  342.  
  343. { Add these masks together to set the flags field of a ControlFontStyleRec    }
  344. { They specify which fields to apply to the text. It is important to make    }
  345. { sure that you specify only the fields that you wish to set.                }
  346.     kControlUseFontMask            = $0001;
  347.     kControlUseFaceMask            = $0002;
  348.     kControlUseSizeMask            = $0004;
  349.     kControlUseForeColorMask    = $0008;
  350.     kControlUseBackColorMask    = $0010;
  351.     kControlUseModeMask            = $0020;
  352.     kControlUseJustMask            = $0040;
  353.     kControlUseAllMask            = $00FF;
  354.     kControlAddFontSizeMask        = $0100;
  355.  
  356. { flags available in Appearance 1.1 or later }
  357. { AddToMetaFont indicates that we want to start with a standard system        }
  358. { font, but then we'd like to add the other attributes. Normally, the meta    }
  359. { font ignores all other flags                                             }
  360.     kControlAddToMetaFontMask    = $0200;
  361.  
  362.  
  363. TYPE
  364.     ControlFontStyleRecPtr = ^ControlFontStyleRec;
  365.     ControlFontStyleRec = RECORD
  366.         flags:                    SInt16;
  367.         font:                    SInt16;
  368.         size:                    SInt16;
  369.         style:                    SInt16;
  370.         mode:                    SInt16;
  371.         just:                    SInt16;
  372.         foreColor:                RGBColor;
  373.         backColor:                RGBColor;
  374.     END;
  375.  
  376.     ControlFontStylePtr                    = ^ControlFontStyleRec;
  377. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  378. {    • Common data tags for Get/SetControlData                                                            }
  379. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  380.  
  381. CONST
  382.     kControlFontStyleTag        = 'font';
  383.     kControlKeyFilterTag        = 'fltr';
  384.  
  385.  
  386. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  387. {    • Control Feature Bits                                                                                }
  388. {——————————————————————————————————————————————————————————————————————————————————————————————————————}
  389.                                                                 {  Control feature bits - returned by GetControlFeatures  }
  390.     kControlSupportsGhosting    = $01;
  391.     kControlSupportsEmbedding    = $02;
  392.     kControlSupportsFocus        = $04;
  393.     kControlWantsIdle            = $08;
  394.     kControlWantsActivate        = $10;
  395.     kControlHandlesTracking        = $20;
  396.     kControlSupportsDataAccess    = $40;
  397.     kControlHasSpecialBackground = $80;
  398.     kControlGetsFocusOnClick    = $0100;
  399.     kControlSupportsCalcBestRect = $0200;
  400.     kControlSupportsLiveFeedback = $0400;
  401.  
  402. { Features introduced in Appearance 1.0.1 }
  403.     kControlHasRadioBehavior    = $0800;
  404.  
  405. { Features introduced in Appearance 1.1 }
  406.     kControlAutoToggles            = $4000;
  407.     kControlSupportsGetRegion    = $00020000;
  408.  
  409. { Control Messages }
  410.     kControlMsgDrawGhost        = 13;
  411.     kControlMsgCalcBestRect        = 14;                            {  Calculate best fitting rectangle for control }
  412.     kControlMsgHandleTracking    = 15;
  413.     kControlMsgFocus            = 16;                            {  param indicates action. }
  414.     kControlMsgKeyDown            = 17;
  415.     kControlMsgIdle                = 18;
  416.     kControlMsgGetFeatures        = 19;
  417.     kControlMsgSetData            = 20;
  418.     kControlMsgGetData            = 21;
  419.     kControlMsgActivate            = 22;
  420.     kControlMsgSetUpBackground    = 23;
  421.     kControlMsgCalcValueFromPos    = 26;
  422.     kControlMsgTestNewMsgSupport = 27;                            {  See if this control supports new messaging }
  423.  
  424. { Messages in Appearance 1.0.1 or later}
  425.     kControlMsgSubValueChanged    = 25;
  426.     kControlMsgSubControlAdded    = 28;
  427.     kControlMsgSubControlRemoved = 29;
  428.  
  429. { Messages in Appearance 1.1 or later }
  430.     kControlMsgApplyTextColor    = 30;
  431.     kControlMsgGetRegion        = 31;
  432.  
  433. {——————————————————————————————————————————————————————————————————————————————————————}
  434. {     This structure is passed into a CDEF when called with the kControlMsgHandleTracking    }
  435. {    message                                                                             }
  436. {——————————————————————————————————————————————————————————————————————————————————————}
  437.  
  438. TYPE
  439.     ControlTrackingRecPtr = ^ControlTrackingRec;
  440.     ControlTrackingRec = RECORD
  441.         startPt:                Point;
  442.         modifiers:                SInt16;
  443.         action:                    ControlActionUPP;
  444.     END;
  445.  
  446.     ControlTrackingPtr                    = ^ControlTrackingRec;
  447. {——————————————————————————————————————————————————————————————————————————————————————}
  448. { This structure is passed into a CDEF when called with the kControlMsgKeyDown message }
  449. {——————————————————————————————————————————————————————————————————————————————————————}
  450.     ControlKeyDownRecPtr = ^ControlKeyDownRec;
  451.     ControlKeyDownRec = RECORD
  452.         modifiers:                SInt16;
  453.         keyCode:                SInt16;
  454.         charCode:                SInt16;
  455.     END;
  456.  
  457.     ControlKeyDownPtr                    = ^ControlKeyDownRec;
  458. {——————————————————————————————————————————————————————————————————————————————————————}
  459. { This structure is passed into a CDEF when called with the kControlMsgGetData or        }
  460. { kControlMsgSetData message                                                             }
  461. {——————————————————————————————————————————————————————————————————————————————————————}
  462.     ControlDataAccessRecPtr = ^ControlDataAccessRec;
  463.     ControlDataAccessRec = RECORD
  464.         tag:                    ResType;
  465.         part:                    ResType;
  466.         size:                    Size;
  467.         dataPtr:                Ptr;
  468.     END;
  469.  
  470.     ControlDataAccessPtr                = ^ControlDataAccessRec;
  471. {——————————————————————————————————————————————————————————————————————————————————————}
  472. { This structure is passed into a CDEF when called with the kControlCalcBestRect msg     }
  473. {——————————————————————————————————————————————————————————————————————————————————————}
  474.     ControlCalcSizeRecPtr = ^ControlCalcSizeRec;
  475.     ControlCalcSizeRec = RECORD
  476.         height:                    SInt16;
  477.         width:                    SInt16;
  478.         baseLine:                SInt16;
  479.     END;
  480.  
  481.     ControlCalcSizePtr                    = ^ControlCalcSizeRec;
  482. {——————————————————————————————————————————————————————————————————————————————————————}
  483. { This structure is passed into a CDEF when called with the kControlMsgSetUpBackground }
  484. { message is sent                                                                        }
  485. {——————————————————————————————————————————————————————————————————————————————————————}
  486.     ControlBackgroundRecPtr = ^ControlBackgroundRec;
  487.     ControlBackgroundRec = RECORD
  488.         depth:                    SInt16;
  489.         colorDevice:            BOOLEAN;
  490.     END;
  491.  
  492.     ControlBackgroundPtr                = ^ControlBackgroundRec;
  493. {——————————————————————————————————————————————————————————————————————————————————————}
  494. { This structure is passed into a CDEF when called with the kControlMsgApplyTextColor    }
  495. { message is sent                                                                        }
  496. {——————————————————————————————————————————————————————————————————————————————————————}
  497.     ControlApplyTextColorRecPtr = ^ControlApplyTextColorRec;
  498.     ControlApplyTextColorRec = RECORD
  499.         depth:                    SInt16;
  500.         colorDevice:            BOOLEAN;
  501.         active:                    BOOLEAN;
  502.     END;
  503.  
  504.     ControlApplyTextColorPtr            = ^ControlApplyTextColorRec;
  505. {——————————————————————————————————————————————————————————————————————————————————————}
  506. { This structure is passed into a CDEF when called with the kControlMsgGetRegion        }
  507. { message is sent                                                                        }
  508. {——————————————————————————————————————————————————————————————————————————————————————}
  509.     ControlGetRegionRecPtr = ^ControlGetRegionRec;
  510.     ControlGetRegionRec = RECORD
  511.         region:                    RgnHandle;
  512.         part:                    ControlPartCode;
  513.     END;
  514.  
  515.     ControlGetRegionPtr                    = ^ControlGetRegionRec;
  516. {——————————————————————————————————————————————————————————————————————————————————————}
  517. {    Key Filter                                                                            }
  518. {                                                                                        }
  519. { Definition of a key filter for intercepting and possibly changing keystrokes            }
  520. { which are destined for a control                                                        }
  521. {——————————————————————————————————————————————————————————————————————————————————————}
  522. {$IFC TYPED_FUNCTION_POINTERS}
  523.     ControlKeyFilterProcPtr = FUNCTION(theControl: ControlHandle; VAR keyCode: SInt16; VAR charCode: SInt16; VAR modifiers: SInt16): ControlKeyFilterResult;
  524. {$ELSEC}
  525.     ControlKeyFilterProcPtr = ProcPtr;
  526. {$ENDC}
  527.  
  528.     ControlKeyFilterUPP = UniversalProcPtr;
  529.  
  530. CONST
  531.     uppControlKeyFilterProcInfo = $00003FE0;
  532.  
  533. FUNCTION NewControlKeyFilterProc(userRoutine: ControlKeyFilterProcPtr): ControlKeyFilterUPP;
  534.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  535.     INLINE $2E9F;
  536.     {$ENDC}
  537.  
  538. FUNCTION CallControlKeyFilterProc(theControl: ControlHandle; VAR keyCode: SInt16; VAR charCode: SInt16; VAR modifiers: SInt16; userRoutine: ControlKeyFilterUPP): ControlKeyFilterResult;
  539.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  540.     INLINE $205F, $4E90;
  541.     {$ENDC}
  542. {——————————————————————————————————————————————————————————————————————————————————————}
  543. {    • BEVEL BUTTON INTERFACE (CDEF 2)                                                    }
  544. {——————————————————————————————————————————————————————————————————————————————————————}
  545. {    Bevel buttons allow you to control the content type (pict/icon/etc.), the behavior    }
  546. { (pushbutton/toggle/sticky), and the bevel size. You also have the option of            }
  547. {    attaching a menu to it. When a menu is present, you can specify which way the         }
  548. {    popup arrow is facing (down or right).                                                }
  549. {                                                                                        }
  550. {    This is all made possible by overloading the Min, Max, and Value parameters for the    }
  551. {    control, as well as adjusting the variant. Here's the breakdown of what goes where:    }
  552. {                                                                                        }
  553. {    Parameter                    What Goes Here                                            }
  554. {    ———————————————————            ————————————————————————————————————————————————————    }
  555. {    Min                            Hi Byte = Behavior, Lo Byte = content type.                }
  556. {    Max                            ResID for resource-based content types.                    }
  557. {    Value                        MenuID to attach, 0 = no menu, please.                    }
  558. {                                                                                        }
  559. {    The variant is broken down into two halfs. The low 2 bits control the bevel type.    }
  560. {    Bit 2 controls the popup arrow direction (if a menu is present) and bit 3 controls    }
  561. {    whether or not to use the control's owning window's font.                            }
  562. {                                                                                        }
  563. {    Constants for all you need to put this together are below. The values for behaviors    }
  564. {    are set up so that you can simply add them to the content type and pass them into    }
  565. {    the Min parameter of NewControl.                                                    }
  566. {                                                                                        }
  567. {    An example call:                                                                    }
  568. {                                                                                        }
  569. {    control = NewControl( window, &bounds, "\p", true, 0, kContentIconSuiteRes +         }
  570. {                            kBehaviorToggles, myIconSuiteID, bevelButtonSmallBevelProc,    }
  571. {                            0L );                                                        }
  572. {                                                                                        }
  573. {    Attaching a menu:                                                                    }
  574. {                                                                                        }
  575. {    control = NewControl( window, &bounds, "\p", true, kMyMenuID, kContentIconSuiteRes,    }
  576. {            myIconSuiteID, bevelButtonSmallBevelProc + kBevelButtonMenuOnRight, 0L );    }
  577. {                                                                                        }
  578. {    This will attach menu ID kMyMenuID to the button, with the popup arrow facing right.}
  579. {    This also puts the menu up to the right of the button. You can also specify that a    }
  580. {    menu can have multiple items checked at once by adding kBehaviorMultiValueMenus        }
  581. {    into the Min parameter. If you do use multivalue menus, the GetBevelButtonMenuValue    }
  582. {    helper function will return the last item chosen from the menu, whether or not it    }
  583. {    was checked.                                                                        }
  584. {                                                                                        }
  585. {    NOTE:     Bevel buttons with menus actually have *two* values. The value of the         }
  586. {            button (on/off), and the value of the menu. The menu value can be gotten    }
  587. {            with the GetBevelButtonMenuValue helper function.                            }
  588. {                                                                                        }
  589. {    Handle-based Content                                                                }
  590. {    ————————————————————                                                                }
  591. {    You can create your control and then set the content to an existing handle to an    }
  592. {    icon suite, etc. using the macros below. Please keep in mind that resource-based    }
  593. {    content is owned by the control, handle-based content is owned by you. The CDEF will}
  594. {    not try to dispose of handle-based content. If you are changing the content type of    }
  595. {    the button on the fly, you must make sure that if you are replacing a handle-        }
  596. {    based content with a resource-based content to properly dispose of the handle,        }
  597. {    else a memory leak will ensue.                                                        }
  598. {                                                                                        }
  599.  
  600. CONST
  601.                                                                 {  Bevel Button Proc IDs  }
  602.     kControlBevelButtonSmallBevelProc = 32;
  603.     kControlBevelButtonNormalBevelProc = 33;
  604.     kControlBevelButtonLargeBevelProc = 34;
  605.  
  606.                                                                 {  Bevel button graphic alignment values  }
  607.     kControlBevelButtonAlignSysDirection = -1;                    {  only left or right }
  608.     kControlBevelButtonAlignCenter = 0;
  609.     kControlBevelButtonAlignLeft = 1;
  610.     kControlBevelButtonAlignRight = 2;
  611.     kControlBevelButtonAlignTop    = 3;
  612.     kControlBevelButtonAlignBottom = 4;
  613.     kControlBevelButtonAlignTopLeft = 5;
  614.     kControlBevelButtonAlignBottomLeft = 6;
  615.     kControlBevelButtonAlignTopRight = 7;
  616.     kControlBevelButtonAlignBottomRight = 8;
  617.  
  618.  
  619. TYPE
  620.     ControlButtonGraphicAlignment        = SInt16;
  621.  
  622. CONST
  623.                                                                 {  Bevel button text alignment values  }
  624.     kControlBevelButtonAlignTextSysDirection = 0;
  625.     kControlBevelButtonAlignTextCenter = 1;
  626.     kControlBevelButtonAlignTextFlushRight = -1;
  627.     kControlBevelButtonAlignTextFlushLeft = -2;
  628.  
  629.  
  630. TYPE
  631.     ControlButtonTextAlignment            = SInt16;
  632.  
  633. CONST
  634.                                                                 {  Bevel button text placement values  }
  635.     kControlBevelButtonPlaceSysDirection = -1;                    {  if graphic on right, then on left }
  636.     kControlBevelButtonPlaceNormally = 0;
  637.     kControlBevelButtonPlaceToRightOfGraphic = 1;
  638.     kControlBevelButtonPlaceToLeftOfGraphic = 2;
  639.     kControlBevelButtonPlaceBelowGraphic = 3;
  640.     kControlBevelButtonPlaceAboveGraphic = 4;
  641.  
  642.  
  643. TYPE
  644.     ControlButtonTextPlacement            = SInt16;
  645. { Add these variant codes to kBevelButtonSmallBevelProc to change the type of button }
  646.  
  647. CONST
  648.     kControlBevelButtonSmallBevelVariant = 0;
  649.     kControlBevelButtonNormalBevelVariant = $01;
  650.     kControlBevelButtonLargeBevelVariant = $02;
  651.     kControlBevelButtonMenuOnRight = $04;
  652.  
  653. {
  654.    Behaviors of bevel buttons. These are set up so you can add
  655.    them together with the content types.
  656. }
  657.     kControlBehaviorPushbutton    = 0;
  658.     kControlBehaviorToggles        = $0100;
  659.     kControlBehaviorSticky        = $0200;
  660.     kControlBehaviorMultiValueMenu = $4000;                        {  only makes sense when a menu is attached. }
  661.     kControlBehaviorOffsetContents = $8000;
  662.  
  663. { Behaviors for 1.0.1 or later }
  664.     kControlBehaviorCommandMenu    = $2000;                        {  menu holds commands, not choices. Overrides multi-value bit. }
  665.  
  666. {  Content types supported by bevel buttons *and* image wells }
  667.     kControlContentTextOnly        = 0;
  668.     kControlContentIconSuiteRes    = 1;
  669.     kControlContentCIconRes        = 2;
  670.     kControlContentPictRes        = 3;
  671.     kControlContentIconSuiteHandle = 129;
  672.     kControlContentCIconHandle    = 130;
  673.     kControlContentPictHandle    = 131;
  674.     kControlContentIconRef        = 132;
  675.  
  676.  
  677. TYPE
  678.     ControlContentType                    = SInt16;
  679. { Data tags supported by the bevel button controls }
  680.  
  681. CONST
  682.     kControlBevelButtonContentTag = 'cont';                        {  ButtonContentInfo }
  683.     kControlBevelButtonTransformTag = 'tran';                    {  IconTransformType }
  684.     kControlBevelButtonTextAlignTag = 'tali';                    {  ButtonTextAlignment }
  685.     kControlBevelButtonTextOffsetTag = 'toff';                    {  SInt16 }
  686.     kControlBevelButtonGraphicAlignTag = 'gali';                {  ButtonGraphicAlignment }
  687.     kControlBevelButtonGraphicOffsetTag = 'goff';                {  Point }
  688.     kControlBevelButtonTextPlaceTag = 'tplc';                    {  ButtonTextPlacement }
  689.     kControlBevelButtonMenuValueTag = 'mval';                    {  SInt16 }
  690.     kControlBevelButtonMenuHandleTag = 'mhnd';                    {  MenuHandle }
  691.     kControlBevelButtonCenterPopupGlyphTag = 'pglc';            {  Boolean: true = center, false = bottom right }
  692.  
  693. { These are tags in 1.0.1 or later }
  694.     kControlBevelButtonLastMenuTag = 'lmnu';                    {  SInt16: menuID of last menu item selected from }
  695.     kControlBevelButtonMenuDelayTag = 'mdly';                    {  SInt32: ticks to delay before menu appears }
  696.  
  697. { tags available with Appearance 1.1 or later }
  698.                                                                 {  Boolean: True = if an icon of the ideal size for }
  699.                                                                 {  the button isn't available, scale a larger or }
  700.                                                                 {  smaller icon to the ideal size. False = don't }
  701.                                                                 {  scale; draw a smaller icon or clip a larger icon. }
  702.                                                                 {  Default is false. Only applies to IconSuites and }
  703.     kControlBevelButtonScaleIconTag = 'scal';                    {  IconRefs. }
  704.  
  705. { Structure to pass into bevel buttons and image wells to set/get content type }
  706.  
  707. TYPE
  708.     ControlButtonContentInfoPtr = ^ControlButtonContentInfo;
  709.     ControlButtonContentInfo = RECORD
  710.         contentType:            ControlContentType;
  711.         CASE INTEGER OF
  712.         0: (
  713.             resID:                SInt16;
  714.             );
  715.         1: (
  716.             cIconHandle:        CIconHandle;
  717.             );
  718.         2: (
  719.             iconSuite:            Handle;
  720.             );
  721.         3: (
  722.             iconRef:            Handle;
  723.             );
  724.         4: (
  725.             picture:            PicHandle;
  726.             );
  727.     END;
  728.  
  729. {——————————————————————————————————————————————————————————————————————————————————————}
  730. {    • SLIDER (CDEF 3)                                                                    }
  731. {——————————————————————————————————————————————————————————————————————————————————————}
  732. {    There are several variants that control the behavior of the slider control. Any        }
  733. {    combination of the following three constants can be added to the basic CDEF ID        }
  734. {    (kSliderProc).                                                                        }
  735. {                                                                                        }
  736. {    Variants:                                                                            }
  737. {                                                                                        }
  738. {        kSliderLiveFeedback         Slider does not use "ghosted" indicator when tracking.    }
  739. {                                ActionProc is called (set via SetControlAction) as the    }
  740. {                                indicator is dragged. The value is updated so that the    }
  741. {                                actionproc can adjust some other property based on the    }
  742. {                                value each time the action proc is called. If no action    }
  743. {                                proc is installed, it reverts to the ghost indicator.    }
  744. {                                                                                        }
  745. {        kSliderHasTickMarks         Slider is drawn with 'tick marks'. The control            }
  746. {                                rectangle must be large enough to accomidate the tick    }
  747. {                                marks.                                                    }
  748. {                                                                                        }
  749. {        kSliderReverseDirection    Slider thumb points in opposite direction than normal.    }
  750. {                                If the slider is vertical, the thumb will point to the    }
  751. {                                left, if the slider is horizontal, the thumb will point    }
  752. {                                upwards.                                                }
  753. {                                                                                        }
  754. {        kSliderNonDirectional    This option overrides the kSliderReverseDirection and    }
  755. {                                kSliderHasTickMarks variants. It creates an indicator    }
  756. {                                which is rectangular and doesn't point in any direction    }
  757. {                                like the normal indicator does.                            }
  758.  
  759. CONST
  760.                                                                 {  Slider proc IDs  }
  761.     kControlSliderProc            = 48;
  762.     kControlSliderLiveFeedback    = $01;
  763.     kControlSliderHasTickMarks    = $02;
  764.     kControlSliderReverseDirection = $04;
  765.     kControlSliderNonDirectional = $08;
  766.  
  767.  
  768. {——————————————————————————————————————————————————————————————————————————————————————}
  769. {    • DISCLOSURE TRIANGLE (CDEF 4)                                                        }
  770. {——————————————————————————————————————————————————————————————————————————————————————}
  771. {    This control can be used as either left or right facing. It can also handle its own    }
  772. {    tracking if you wish. This means that when the 'autotoggle' variant is used, if the    }
  773. {    user clicks the control, it's state will change automatically from open to closed    }
  774. {    and vice-versa depending on its initial state. After a successful call to Track-    }
  775. {     Control, you can just check the current value to see what state it was switched to.    }
  776.                                                                 {  Triangle proc IDs  }
  777.     kControlTriangleProc        = 64;
  778.     kControlTriangleLeftFacingProc = 65;
  779.     kControlTriangleAutoToggleProc = 66;
  780.     kControlTriangleLeftFacingAutoToggleProc = 67;
  781.  
  782.                                                                 {  Tagged data supported by disclosure triangles  }
  783.     kControlTriangleLastValueTag = 'last';                        {  SInt16 }
  784.  
  785. {——————————————————————————————————————————————————————————————————————————————————————}
  786. {    • PROGRESS INDICATOR (CDEF 5)                                                        }
  787. {——————————————————————————————————————————————————————————————————————————————————————}
  788. {    This CDEF implements both determinate and indeterminate progress bars. To switch,     }
  789. {    just use SetControlData to set the indeterminate flag to make it indeterminate call    }
  790. {    IdleControls to step thru the animation. IdleControls should be called at least        }
  791. {    once during your event loop.                                                        }
  792. {                                                                                        }
  793.                                                                 {  Progress Bar proc IDs  }
  794.     kControlProgressBarProc        = 80;
  795.  
  796.                                                                 {  Tagged data supported by progress bars  }
  797.     kControlProgressBarIndeterminateTag = 'inde';                {  Boolean }
  798.  
  799. {——————————————————————————————————————————————————————————————————————————————————————}
  800. {    • LITTLE ARROWS (CDEF 6)                                                            }
  801. {——————————————————————————————————————————————————————————————————————————————————————}
  802. {     This control implements the little up and down arrows you'd see in the Memory        }
  803. {    control panel for adjusting the cache size.                                         }
  804.                                                                 {  Little Arrows proc IDs  }
  805.     kControlLittleArrowsProc    = 96;
  806.  
  807. {——————————————————————————————————————————————————————————————————————————————————————}
  808. {    • CHASING ARROWS (CDEF 7)                                                            }
  809. {——————————————————————————————————————————————————————————————————————————————————————}
  810. {    To animate this control, make sure to call IdleControls repeatedly.                    }
  811. {                                                                                        }
  812.                                                                 {  Chasing Arrows proc IDs  }
  813.     kControlChasingArrowsProc    = 112;
  814.  
  815. {——————————————————————————————————————————————————————————————————————————————————————}
  816. {    • TABS (CDEF 8)                                                                        }
  817. {——————————————————————————————————————————————————————————————————————————————————————}
  818. {    Tabs use an auxiliary resource (tab#) to hold tab information such as the tab name    }
  819. {    and an icon suite ID for each tab.                                                    }
  820. {                                                                                        }
  821. {    The ID of the tab# resource that you wish to associate with a tab control should     }
  822. {    be passed in as the Value parameter of the control. If you are using GetNewControl, }
  823. {    then the Value slot in the CNTL resource should have the ID of the 'tab#' resource    }
  824. {    on creation.                                                                        }
  825. {                                                                                        }
  826. {    Passing zero in for the tab# resource tells the control not to read in a tab# res.    }
  827. {    You can then use SetControlMaximum to add tabs, followed by a call to SetControlData}
  828. {    with the kControlTabInfoTag, passing in a pointer to a ControlTabInfoRec. This sets    }
  829. {     the name and optionally an icon for a tab.                                            }
  830.                                                                 {  Tabs proc IDs  }
  831.     kControlTabLargeProc        = 128;                            {  Large tab size, north facing     }
  832.     kControlTabSmallProc        = 129;                            {  Small tab size, north facing     }
  833.     kControlTabLargeNorthProc    = 128;                            {  Large tab size, north facing     }
  834.     kControlTabSmallNorthProc    = 129;                            {  Small tab size, north facing     }
  835.     kControlTabLargeSouthProc    = 130;                            {  Large tab size, south facing     }
  836.     kControlTabSmallSouthProc    = 131;                            {  Small tab size, south facing     }
  837.     kControlTabLargeEastProc    = 132;                            {  Large tab size, east facing     }
  838.     kControlTabSmallEastProc    = 133;                            {  Small tab size, east facing     }
  839.     kControlTabLargeWestProc    = 134;                            {  Large tab size, west facing     }
  840.     kControlTabSmallWestProc    = 135;                            {  Small tab size, west facing     }
  841.  
  842.                                                                 {  Tagged data supported by progress bars  }
  843.     kControlTabContentRectTag    = 'rect';                        {  Rect }
  844.     kControlTabEnabledFlagTag    = 'enab';                        {  Boolean }
  845.     kControlTabFontStyleTag        = 'font';                        {  ControlFontStyleRec }
  846.  
  847. { New tags in 1.0.1 or later }
  848.     kControlTabInfoTag            = 'tabi';                        {  ControlTabInfoRec }
  849.  
  850.     kControlTabInfoVersionZero    = 0;
  851.  
  852.  
  853. TYPE
  854.     ControlTabInfoRecPtr = ^ControlTabInfoRec;
  855.     ControlTabInfoRec = RECORD
  856.         version:                SInt16;                                    {  version of this structure. }
  857.         iconSuiteID:            SInt16;                                    {  icon suite to use. Zero indicates no icon }
  858.         name:                    Str255;                                    {  name to be displayed on the tab }
  859.     END;
  860.  
  861. {——————————————————————————————————————————————————————————————————————————————————————}
  862. {    • VISUAL SEPARATOR (CDEF 9)                                                            }
  863. {——————————————————————————————————————————————————————————————————————————————————————}
  864. {    Separator lines determine their orientation (horizontal or vertical) automatically    }
  865. {    based on the relative height and width of their contrlRect.                            }
  866.  
  867. CONST
  868.                                                                 {  Visual separator proc IDs  }
  869.     kControlSeparatorLineProc    = 144;
  870.  
  871.  
  872. {——————————————————————————————————————————————————————————————————————————————————————}
  873. {    • GROUP BOX (CDEF 10)                                                                }
  874. {——————————————————————————————————————————————————————————————————————————————————————}
  875. {    The group box CDEF can be use in several ways. It can have no title, a text title,     }
  876. {    a check box as the title, or a popup button as a title. There are two versions of     }
  877. {    group boxes, primary and secondary, which look slightly different.                    }
  878.                                                                 {  Group Box proc IDs  }
  879.     kControlGroupBoxTextTitleProc = 160;
  880.     kControlGroupBoxCheckBoxProc = 161;
  881.     kControlGroupBoxPopupButtonProc = 162;
  882.     kControlGroupBoxSecondaryTextTitleProc = 164;
  883.     kControlGroupBoxSecondaryCheckBoxProc = 165;
  884.     kControlGroupBoxSecondaryPopupButtonProc = 166;
  885.  
  886.                                                                 {  Tagged data supported by group box  }
  887.     kControlGroupBoxMenuHandleTag = 'mhan';                        {  MenuHandle (popup title only) }
  888.     kControlGroupBoxFontStyleTag = 'font';                        {  ControlFontStyleRec }
  889.  
  890. { tags available with Appearance 1.1 or later }
  891.     kControlGroupBoxTitleRectTag = 'trec';                        {  Rect. Rectangle that the title text/control is drawn in. (get only) }
  892.  
  893. {——————————————————————————————————————————————————————————————————————————————————————}
  894. {    • IMAGE WELL (CDEF 11)                                                                }
  895. {——————————————————————————————————————————————————————————————————————————————————————}
  896. {    Image Wells allow you to control the content type (pict/icon/etc.) shown in the     }
  897. {    well.                                                                                }
  898. {                                                                                        }
  899. {    This is made possible by overloading the Min and Value parameters for the control.    }
  900. {                                                                                        }
  901. {    Parameter                    What Goes Here                                            }
  902. {    ———————————————————            ——————————————————————————————————————————————————        }
  903. {    Min                            content type (see constants for bevel buttons)            }
  904. {    Value                        Resource ID of content type, if resource-based.            }
  905. {                                                                                        }
  906. {                                                                                        }
  907. {    Handle-based Content                                                                }
  908. {    ————————————————————                                                                }
  909. {    You can create your control and then set the content to an existing handle to an    }
  910. {    icon suite, etc. using the macros below. Please keep in mind that resource-based    }
  911. {    content is owned by the control, handle-based content is owned by you. The CDEF will}
  912. {    not try to dispose of handle-based content. If you are changing the content type of    }
  913. {    the button on the fly, you must make sure that if you are replacing a handle-        }
  914. {    based content with a resource-based content to properly dispose of the handle,        }
  915. {    else a memory leak will ensue.                                                        }
  916. {                                                                                        }
  917.                                                                 {  Image Well proc IDs  }
  918.     kControlImageWellProc        = 176;
  919.  
  920.                                                                 {  Tagged data supported by image wells  }
  921.     kControlImageWellContentTag    = 'cont';                        {  ButtonContentInfo }
  922.     kControlImageWellTransformTag = 'tran';                        {  IconTransformType }
  923.  
  924. {——————————————————————————————————————————————————————————————————————————————————————}
  925. {    • POPUP ARROW (CDEF 12)                                                                }
  926. {——————————————————————————————————————————————————————————————————————————————————————}
  927. {    The popup arrow CDEF is used to draw the small arrow normally associated with a     }
  928. {    popup control. The arrow can point in four directions, and a small or large version }
  929. {    can be used. This control is provided to allow clients to draw the arrow in a         }
  930. {    normalized fashion which will take advantage of themes automatically.                }
  931. {                                                                                        }
  932.                                                                 {  Popup Arrow proc IDs  }
  933.     kControlPopupArrowEastProc    = 192;
  934.     kControlPopupArrowWestProc    = 193;
  935.     kControlPopupArrowNorthProc    = 194;
  936.     kControlPopupArrowSouthProc    = 195;
  937.     kControlPopupArrowSmallEastProc = 196;
  938.     kControlPopupArrowSmallWestProc = 197;
  939.     kControlPopupArrowSmallNorthProc = 198;
  940.     kControlPopupArrowSmallSouthProc = 199;
  941.  
  942. {——————————————————————————————————————————————————————————————————————————————————————}
  943. {    • PLACARD (CDEF 14)                                                                    }
  944. {——————————————————————————————————————————————————————————————————————————————————————}
  945.                                                                 {  Placard proc IDs  }
  946.     kControlPlacardProc            = 224;
  947.  
  948. {——————————————————————————————————————————————————————————————————————————————————————}
  949. {    • CLOCK (CDEF 15)                                                                    }
  950. {——————————————————————————————————————————————————————————————————————————————————————}
  951. {     NOTE:    You can specify more options in the Value paramter when creating the clock.    }
  952. {            See below.                                                                    }
  953. {                                                                                        }
  954. {    NOTE:    Under Appearance 1.1, the clock control knows and returns more part codes.    }
  955. {            The new clock-specific part codes are defined with the other control parts.    }
  956. {            Besides these clock-specific parts, we also return kControlUpButtonPart        }
  957. {            and kControlDownButtonPart when they hit the up and down arrows.            }
  958. {            The new part codes give you more flexibility for focusing and hit testing.    }
  959. {                                                                                        }
  960. {            The original kControlClockPart is still valid. When hit testing, it means    }
  961. {            that some non-editable area of the clock's whitespace has been clicked.        }
  962. {            When focusing a currently unfocused clock, it changes the focus to the        }
  963. {            first part; it is the same as passing kControlFocusNextPart. When            }
  964. {            re-focusing a focused clock, it will not change the focus at all.            }
  965.                                                                 {  Clock proc IDs  }
  966.     kControlClockTimeProc        = 240;
  967.     kControlClockTimeSecondsProc = 241;
  968.     kControlClockDateProc        = 242;
  969.     kControlClockMonthYearProc    = 243;
  970.  
  971. {——————————————————————————————————————————————————————————————————————————————————————}
  972. {     These flags can be passed into 'value' field on creation of the control.            }
  973. {     Value is set to 0 after control is created.                                            }
  974. {                                                                                        }
  975. {    The kClockIsLive value tells the clock to automatically update on idle (clock will    }
  976. {    have the current time). This flag is only valid when the kClockIsDisplayOnly flag    }
  977. {    is set.                                                                                }
  978. {——————————————————————————————————————————————————————————————————————————————————————}
  979.     kControlClockNoFlags        = 0;
  980.     kControlClockIsDisplayOnly    = 1;
  981.     kControlClockIsLive            = 2;
  982.  
  983.                                                                 {  Tagged data supported by clocks  }
  984.     kControlClockLongDateTag    = 'date';                        {  LongDateRec }
  985.     kControlClockFontStyleTag    = 'font';                        {  ControlFontStyleRec }
  986.  
  987. {——————————————————————————————————————————————————————————————————————————————————————}
  988. {    • USER PANE (CDEF 16)                                                                }
  989. {——————————————————————————————————————————————————————————————————————————————————————}
  990.                                                                 {  User Pane proc IDs  }
  991.     kControlUserPaneProc        = 256;
  992.  
  993. { Tagged data supported by user panes }
  994. { Currently, they are all proc ptrs for doing things like drawing and hit testing, etc. }
  995.     kControlUserItemDrawProcTag    = 'uidp';                        {  UserItemUPP }
  996.     kControlUserPaneDrawProcTag    = 'draw';                        {  ControlUserPaneDrawingUPP }
  997.     kControlUserPaneHitTestProcTag = 'hitt';                    {  ControlUserPaneHitTestUPP }
  998.     kControlUserPaneTrackingProcTag = 'trak';                    {  ControlUserPaneTrackingUPP }
  999.     kControlUserPaneIdleProcTag    = 'idle';                        {  ControlUserPaneIdleUPP }
  1000.     kControlUserPaneKeyDownProcTag = 'keyd';                    {  ControlUserPaneKeyDownUPP }
  1001.     kControlUserPaneActivateProcTag = 'acti';                    {  ControlUserPaneActivateUPP }
  1002.     kControlUserPaneFocusProcTag = 'foci';                        {  ControlUserPaneFocusUPP }
  1003.     kControlUserPaneBackgroundProcTag = 'back';                    {  ControlUserPaneBackgroundUPP }
  1004.  
  1005.  
  1006. TYPE
  1007. {$IFC TYPED_FUNCTION_POINTERS}
  1008.     ControlUserPaneDrawProcPtr = PROCEDURE(control: ControlHandle; part: SInt16);
  1009. {$ELSEC}
  1010.     ControlUserPaneDrawProcPtr = ProcPtr;
  1011. {$ENDC}
  1012.  
  1013. {$IFC TYPED_FUNCTION_POINTERS}
  1014.     ControlUserPaneHitTestProcPtr = FUNCTION(control: ControlHandle; where: Point): ControlPartCode;
  1015. {$ELSEC}
  1016.     ControlUserPaneHitTestProcPtr = ProcPtr;
  1017. {$ENDC}
  1018.  
  1019. {$IFC TYPED_FUNCTION_POINTERS}
  1020.     ControlUserPaneTrackingProcPtr = FUNCTION(control: ControlHandle; startPt: Point; actionProc: ControlActionUPP): ControlPartCode;
  1021. {$ELSEC}
  1022.     ControlUserPaneTrackingProcPtr = ProcPtr;
  1023. {$ENDC}
  1024.  
  1025. {$IFC TYPED_FUNCTION_POINTERS}
  1026.     ControlUserPaneIdleProcPtr = PROCEDURE(control: ControlHandle);
  1027. {$ELSEC}
  1028.     ControlUserPaneIdleProcPtr = ProcPtr;
  1029. {$ENDC}
  1030.  
  1031. {$IFC TYPED_FUNCTION_POINTERS}
  1032.     ControlUserPaneKeyDownProcPtr = FUNCTION(control: ControlHandle; keyCode: SInt16; charCode: SInt16; modifiers: SInt16): ControlPartCode;
  1033. {$ELSEC}
  1034.     ControlUserPaneKeyDownProcPtr = ProcPtr;
  1035. {$ENDC}
  1036.  
  1037. {$IFC TYPED_FUNCTION_POINTERS}
  1038.     ControlUserPaneActivateProcPtr = PROCEDURE(control: ControlHandle; activating: BOOLEAN);
  1039. {$ELSEC}
  1040.     ControlUserPaneActivateProcPtr = ProcPtr;
  1041. {$ENDC}
  1042.  
  1043. {$IFC TYPED_FUNCTION_POINTERS}
  1044.     ControlUserPaneFocusProcPtr = FUNCTION(control: ControlHandle; action: ControlFocusPart): ControlPartCode;
  1045. {$ELSEC}
  1046.     ControlUserPaneFocusProcPtr = ProcPtr;
  1047. {$ENDC}
  1048.  
  1049. {$IFC TYPED_FUNCTION_POINTERS}
  1050.     ControlUserPaneBackgroundProcPtr = PROCEDURE(control: ControlHandle; info: ControlBackgroundPtr);
  1051. {$ELSEC}
  1052.     ControlUserPaneBackgroundProcPtr = ProcPtr;
  1053. {$ENDC}
  1054.  
  1055.     ControlUserPaneDrawUPP = UniversalProcPtr;
  1056.     ControlUserPaneHitTestUPP = UniversalProcPtr;
  1057.     ControlUserPaneTrackingUPP = UniversalProcPtr;
  1058.     ControlUserPaneIdleUPP = UniversalProcPtr;
  1059.     ControlUserPaneKeyDownUPP = UniversalProcPtr;
  1060.     ControlUserPaneActivateUPP = UniversalProcPtr;
  1061.     ControlUserPaneFocusUPP = UniversalProcPtr;
  1062.     ControlUserPaneBackgroundUPP = UniversalProcPtr;
  1063.  
  1064. CONST
  1065.     uppControlUserPaneDrawProcInfo = $000002C0;
  1066.     uppControlUserPaneHitTestProcInfo = $000003E0;
  1067.     uppControlUserPaneTrackingProcInfo = $00000FE0;
  1068.     uppControlUserPaneIdleProcInfo = $000000C0;
  1069.     uppControlUserPaneKeyDownProcInfo = $00002AE0;
  1070.     uppControlUserPaneActivateProcInfo = $000001C0;
  1071.     uppControlUserPaneFocusProcInfo = $000002E0;
  1072.     uppControlUserPaneBackgroundProcInfo = $000003C0;
  1073.  
  1074. FUNCTION NewControlUserPaneDrawProc(userRoutine: ControlUserPaneDrawProcPtr): ControlUserPaneDrawUPP;
  1075.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1076.     INLINE $2E9F;
  1077.     {$ENDC}
  1078.  
  1079. FUNCTION NewControlUserPaneHitTestProc(userRoutine: ControlUserPaneHitTestProcPtr): ControlUserPaneHitTestUPP;
  1080.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1081.     INLINE $2E9F;
  1082.     {$ENDC}
  1083.  
  1084. FUNCTION NewControlUserPaneTrackingProc(userRoutine: ControlUserPaneTrackingProcPtr): ControlUserPaneTrackingUPP;
  1085.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1086.     INLINE $2E9F;
  1087.     {$ENDC}
  1088.  
  1089. FUNCTION NewControlUserPaneIdleProc(userRoutine: ControlUserPaneIdleProcPtr): ControlUserPaneIdleUPP;
  1090.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1091.     INLINE $2E9F;
  1092.     {$ENDC}
  1093.  
  1094. FUNCTION NewControlUserPaneKeyDownProc(userRoutine: ControlUserPaneKeyDownProcPtr): ControlUserPaneKeyDownUPP;
  1095.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1096.     INLINE $2E9F;
  1097.     {$ENDC}
  1098.  
  1099. FUNCTION NewControlUserPaneActivateProc(userRoutine: ControlUserPaneActivateProcPtr): ControlUserPaneActivateUPP;
  1100.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1101.     INLINE $2E9F;
  1102.     {$ENDC}
  1103.  
  1104. FUNCTION NewControlUserPaneFocusProc(userRoutine: ControlUserPaneFocusProcPtr): ControlUserPaneFocusUPP;
  1105.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1106.     INLINE $2E9F;
  1107.     {$ENDC}
  1108.  
  1109. FUNCTION NewControlUserPaneBackgroundProc(userRoutine: ControlUserPaneBackgroundProcPtr): ControlUserPaneBackgroundUPP;
  1110.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1111.     INLINE $2E9F;
  1112.     {$ENDC}
  1113.  
  1114. PROCEDURE CallControlUserPaneDrawProc(control: ControlHandle; part: SInt16; userRoutine: ControlUserPaneDrawUPP);
  1115.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1116.     INLINE $205F, $4E90;
  1117.     {$ENDC}
  1118.  
  1119. FUNCTION CallControlUserPaneHitTestProc(control: ControlHandle; where: Point; userRoutine: ControlUserPaneHitTestUPP): ControlPartCode;
  1120.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1121.     INLINE $205F, $4E90;
  1122.     {$ENDC}
  1123.  
  1124. FUNCTION CallControlUserPaneTrackingProc(control: ControlHandle; startPt: Point; actionProc: ControlActionUPP; userRoutine: ControlUserPaneTrackingUPP): ControlPartCode;
  1125.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1126.     INLINE $205F, $4E90;
  1127.     {$ENDC}
  1128.  
  1129. PROCEDURE CallControlUserPaneIdleProc(control: ControlHandle; userRoutine: ControlUserPaneIdleUPP);
  1130.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1131.     INLINE $205F, $4E90;
  1132.     {$ENDC}
  1133.  
  1134. FUNCTION CallControlUserPaneKeyDownProc(control: ControlHandle; keyCode: SInt16; charCode: SInt16; modifiers: SInt16; userRoutine: ControlUserPaneKeyDownUPP): ControlPartCode;
  1135.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1136.     INLINE $205F, $4E90;
  1137.     {$ENDC}
  1138.  
  1139. PROCEDURE CallControlUserPaneActivateProc(control: ControlHandle; activating: BOOLEAN; userRoutine: ControlUserPaneActivateUPP);
  1140.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1141.     INLINE $205F, $4E90;
  1142.     {$ENDC}
  1143.  
  1144. FUNCTION CallControlUserPaneFocusProc(control: ControlHandle; action: ControlFocusPart; userRoutine: ControlUserPaneFocusUPP): ControlPartCode;
  1145.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1146.     INLINE $205F, $4E90;
  1147.     {$ENDC}
  1148.  
  1149. PROCEDURE CallControlUserPaneBackgroundProc(control: ControlHandle; info: ControlBackgroundPtr; userRoutine: ControlUserPaneBackgroundUPP);
  1150.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1151.     INLINE $205F, $4E90;
  1152.     {$ENDC}
  1153. {
  1154.   ——————————————————————————————————————————————————————————————————————————————————————————
  1155.       • EDIT TEXT (CDEF 17)
  1156.   ——————————————————————————————————————————————————————————————————————————————————————————
  1157. }
  1158.  
  1159. CONST
  1160.                                                                 {  Edit Text proc IDs  }
  1161.     kControlEditTextProc        = 272;
  1162.     kControlEditTextPasswordProc = 274;
  1163.  
  1164. { proc IDs available with Appearance 1.1 or later }
  1165.     kControlEditTextInlineInputProc = 276;                        {  Can't combine with the other variants }
  1166.  
  1167.                                                                 {  Tagged data supported by edit text  }
  1168.     kControlEditTextStyleTag    = 'font';                        {  ControlFontStyleRec }
  1169.     kControlEditTextTextTag        = 'text';                        {  Buffer of chars - you supply the buffer }
  1170.     kControlEditTextTEHandleTag    = 'than';                        {  The TEHandle of the text edit record }
  1171.     kControlEditTextKeyFilterTag = 'fltr';
  1172.     kControlEditTextSelectionTag = 'sele';                        {  EditTextSelectionRec }
  1173.     kControlEditTextPasswordTag    = 'pass';                        {  The clear text password text }
  1174.  
  1175. { tags available with Appearance 1.1 or later }
  1176.     kControlEditTextKeyScriptBehaviorTag = 'kscr';                {  ControlKeyScriptBehavior. Defaults to "PrefersRoman" for password fields, }
  1177.                                                                 {         or "AllowAnyScript" for non-password fields. }
  1178.     kControlEditTextLockedTag    = 'lock';                        {  Boolean. Locking disables editability. }
  1179.     kControlEditTextFixedTextTag = 'ftxt';                        {  Like the normal text tag, but fixes inline input first }
  1180.     kControlEditTextValidationProcTag = 'vali';                    {  ControlEditTextValidationUPP. Called when a key filter can't be: after cut, paste, etc. }
  1181.     kControlEditTextInlinePreUpdateProcTag = 'prup';            {  TSMTEPreUpdateUPP and TSMTEPostUpdateUpp. For use with inline input variant... }
  1182.     kControlEditTextInlinePostUpdateProcTag = 'poup';            {  ...The refCon parameter will contain the ControlHandle. }
  1183.  
  1184.  
  1185. TYPE
  1186.     ControlEditTextSelectionRecPtr = ^ControlEditTextSelectionRec;
  1187.     ControlEditTextSelectionRec = RECORD
  1188.                                                                         {  Structure for getting the edit text selection  }
  1189.         selStart:                SInt16;
  1190.         selEnd:                    SInt16;
  1191.     END;
  1192.  
  1193.     ControlEditTextSelectionPtr            = ^ControlEditTextSelectionRec;
  1194. {$IFC TYPED_FUNCTION_POINTERS}
  1195.     ControlEditTextValidationProcPtr = PROCEDURE(control: ControlHandle);
  1196. {$ELSEC}
  1197.     ControlEditTextValidationProcPtr = ProcPtr;
  1198. {$ENDC}
  1199.  
  1200.     ControlEditTextValidationUPP = UniversalProcPtr;
  1201.  
  1202. CONST
  1203.     uppControlEditTextValidationProcInfo = $000000C0;
  1204.  
  1205. FUNCTION NewControlEditTextValidationProc(userRoutine: ControlEditTextValidationProcPtr): ControlEditTextValidationUPP;
  1206.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1207.     INLINE $2E9F;
  1208.     {$ENDC}
  1209.  
  1210. PROCEDURE CallControlEditTextValidationProc(control: ControlHandle; userRoutine: ControlEditTextValidationUPP);
  1211.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1212.     INLINE $205F, $4E90;
  1213.     {$ENDC}
  1214. {——————————————————————————————————————————————————————————————————————————————————————}
  1215. {    • STATIC TEXT (CDEF 18)                                                                }
  1216. {——————————————————————————————————————————————————————————————————————————————————————}
  1217. { Static Text proc IDs }
  1218.  
  1219. CONST
  1220.     kControlStaticTextProc        = 288;
  1221.  
  1222. { Tagged data supported by static text }
  1223.     kControlStaticTextStyleTag    = 'font';                        {  ControlFontStyleRec }
  1224.     kControlStaticTextTextTag    = 'text';                        {  Copy of text }
  1225.     kControlStaticTextTextHeightTag = 'thei';                    {  SInt16 }
  1226.  
  1227. { Tags available with appearance 1.1 or later }
  1228.     kControlStaticTextTruncTag    = 'trun';                        {  TruncCode (-1 means no truncation) }
  1229.  
  1230. {——————————————————————————————————————————————————————————————————————————————————————}
  1231. {    • PICTURE CONTROL (CDEF 19)                                                            }
  1232. {——————————————————————————————————————————————————————————————————————————————————————}
  1233. {    Value parameter should contain the ID of the picture you wish to display when        }
  1234. {    creating controls of this type. If you don't want the control tracked at all, use     }
  1235. {    the 'no track' variant.                                                                }
  1236.                                                                 {  Picture control proc IDs  }
  1237.     kControlPictureProc            = 304;
  1238.     kControlPictureNoTrackProc    = 305;                            {  immediately returns kControlPicturePart }
  1239.  
  1240. {——————————————————————————————————————————————————————————————————————————————————————}
  1241. {    • ICON CONTROL (CDEF 20)                                                            }
  1242. {——————————————————————————————————————————————————————————————————————————————————————}
  1243. {    Value parameter should contain the ID of the ICON or cicn you wish to display when    }
  1244. {    creating controls of this type. If you don't want the control tracked at all, use     }
  1245. {    the 'no track' variant.                                                                }
  1246. { Icon control proc IDs }
  1247.     kControlIconProc            = 320;
  1248.     kControlIconNoTrackProc        = 321;                            {  immediately returns kControlIconPart }
  1249.     kControlIconSuiteProc        = 322;
  1250.     kControlIconSuiteNoTrackProc = 323;                            {  immediately returns kControlIconPart }
  1251.  
  1252.                                                                 {  icon ref controls may have either an icon, color icon, icon suite, or icon ref. }
  1253.                                                                 {  for data other than icon, you must set the data by passing a }
  1254.                                                                 {  ControlButtonContentInfo to SetControlData }
  1255.     kControlIconRefProc            = 324;
  1256.     kControlIconRefNoTrackProc    = 325;                            {  immediately returns kControlIconPart }
  1257.  
  1258. { Tagged data supported by icon controls }
  1259.     kControlIconTransformTag    = 'trfm';                        {  IconTransformType }
  1260.     kControlIconAlignmentTag    = 'algn';                        {  IconAlignmentType }
  1261.  
  1262. { Tags available with appearance 1.1 or later }
  1263.     kControlIconResourceIDTag    = 'ires';                        {  SInt16 resource ID of icon to use }
  1264.     kControlIconContentTag        = 'cont';                        {  accepts a ControlButtonContentInfo }
  1265.  
  1266. {——————————————————————————————————————————————————————————————————————————————————————}
  1267. {    • WINDOW HEADER (CDEF 21)                                                            }
  1268. {——————————————————————————————————————————————————————————————————————————————————————}
  1269.                                                                 {  Window Header proc IDs  }
  1270.     kControlWindowHeaderProc    = 336;                            {  normal header }
  1271.     kControlWindowListViewHeaderProc = 337;                        {  variant for list views - no bottom line }
  1272.  
  1273. {——————————————————————————————————————————————————————————————————————————————————————}
  1274. {    • LIST BOX (CDEF 22)                                                                }
  1275. {——————————————————————————————————————————————————————————————————————————————————————}
  1276. {    Lists use an auxiliary resource to define their format. The resource type used is     }
  1277. {    'ldes' and a definition for it can be found in Appearance.r. The resource ID for     }
  1278. {    the ldes is passed in the 'value' parameter when creating the control. You may pass }
  1279. {    zero in value. This tells the List Box control to not use a resource. The list will }
  1280. {    be created with default values, and will use the standard LDEF (0). You can change    }
  1281. {    the list by getting the list handle. You can set the LDEF to use by using the tag    }
  1282. {    below (kControlListBoxLDEFTag)                                                        }
  1283.                                                                 {  List Box proc IDs  }
  1284.     kControlListBoxProc            = 352;
  1285.     kControlListBoxAutoSizeProc    = 353;
  1286.  
  1287.                                                                 {  Tagged data supported by list box  }
  1288.     kControlListBoxListHandleTag = 'lhan';                        {  ListHandle }
  1289.     kControlListBoxKeyFilterTag    = 'fltr';                        {  ControlKeyFilterUPP }
  1290.     kControlListBoxFontStyleTag    = 'font';                        {  ControlFontStyleRec }
  1291.  
  1292. { New tags in 1.0.1 or later }
  1293.     kControlListBoxDoubleClickTag = 'dblc';                        {  Boolean. Was last click a double-click? }
  1294.     kControlListBoxLDEFTag        = 'ldef';                        {  SInt16. ID of LDEF to use. }
  1295.  
  1296. {——————————————————————————————————————————————————————————————————————————————————————}
  1297. {    • PUSH BUTTON (CDEF 23)                                                                }
  1298. {——————————————————————————————————————————————————————————————————————————————————————}
  1299. {    The new standard checkbox and radio button controls support a "mixed" value that    }
  1300. {    indicates that the current setting contains a mixed set of on and off values. The     }
  1301. {    control value used to display this indication is defined in Controls.h:                }
  1302. {                                                                                        }
  1303. {        kControlCheckBoxMixedValue = 2                                                    }
  1304. {                                                                                        }
  1305. {    Two new variants of the standard pushbutton have been added to the standard control    }
  1306. {    suite that draw a color icon next to the control title. One variant draws the icon    }
  1307. {    on the left side, the other draws it on the right side (when the system justifica-    }
  1308. {    tion is right to left, these are reversed).                                            }
  1309. {                                                                                        }
  1310. {    When either of the icon pushbuttons are created, the contrlMax field of the control }
  1311. {    record is used to determine the ID of the 'cicn' resource drawn in the pushbutton.    }
  1312. {                                                                                        }
  1313. {    In addition, a push button can now be told to draw with a default outline using the    }
  1314. {    SetControlData routine with the kPushButtonDefaultTag below.                        }
  1315. {                                                                                        }
  1316. {    A push button may also be marked using the kControlPushButtonCancelTag. This has    }
  1317. {    no visible representation, but does cause the button to play the CancelButton theme    }
  1318. {    sound instead of the regular pushbutton theme sound when pressed.                    }
  1319. {                                                                                        }
  1320.                                                                 {  Theme Push Button/Check Box/Radio Button proc IDs  }
  1321.     kControlPushButtonProc        = 368;
  1322.     kControlCheckBoxProc        = 369;
  1323.     kControlRadioButtonProc        = 370;
  1324.     kControlPushButLeftIconProc    = 374;                            {  Standard pushbutton with left-side icon }
  1325.     kControlPushButRightIconProc = 375;                            {  Standard pushbutton with right-side icon }
  1326.  
  1327. { Variants with Appearance 1.1 or later }
  1328.     kControlCheckBoxAutoToggleProc = 371;
  1329.     kControlRadioButtonAutoToggleProc = 372;
  1330.  
  1331.                                                                 {  Tagged data supported by standard buttons  }
  1332.     kControlPushButtonDefaultTag = 'dflt';                        {  default ring flag }
  1333.  
  1334.     kControlPushButtonCancelTag    = 'cncl';                        {  cancel button flag (1.1 and later) }
  1335.  
  1336. {——————————————————————————————————————————————————————————————————————————————————————}
  1337. {    • SCROLL BAR (CDEF 24)                                                                }
  1338. {——————————————————————————————————————————————————————————————————————————————————————}
  1339. {    This is the new Appearance scroll bar.                                                }
  1340. {                                                                                        }
  1341.                                                                 {  Theme Scroll Bar proc IDs  }
  1342.     kControlScrollBarProc        = 384;                            {  normal scroll bar }
  1343.     kControlScrollBarLiveProc    = 386;                            {  live scrolling variant }
  1344.  
  1345. {——————————————————————————————————————————————————————————————————————————————————————}
  1346. {    • POPUP BUTTON (CDEF 25)                                                            }
  1347. {——————————————————————————————————————————————————————————————————————————————————————}
  1348. {    This is the new Appearance Popup Button. It takes the same variants and does the     }
  1349. {    same overloading as the previous popup menu control. There are some differences:    }
  1350. {                                                                                        }
  1351. {    Passing in a menu ID of -12345 causes the popup not to try and get the menu from a    }
  1352. {    resource. Instead, you can build the menu and later stuff the menuhandle field in     }
  1353. {    the popup data information.                                                            }
  1354. {                                                                                        }
  1355. {    You can pass -1 in the Max parameter to have the control calculate the width of the    }
  1356. {    title on its own instead of guessing and then tweaking to get it right. It adds the    }
  1357. {    appropriate amount of space between the title and the popup.                        }
  1358. {                                                                                        }
  1359.                                                                 {  Theme Popup Button proc IDs  }
  1360.     kControlPopupButtonProc        = 400;
  1361.     kControlPopupFixedWidthVariant = $01;
  1362.     kControlPopupVariableWidthVariant = $02;
  1363.     kControlPopupUseAddResMenuVariant = $04;
  1364.     kControlPopupUseWFontVariant = $08;                            {  kControlUsesOwningWindowsFontVariant }
  1365.  
  1366. { These tags are available in 1.0.1 or later of Appearance }
  1367.     kControlPopupButtonMenuHandleTag = 'mhan';                    {  MenuHandle }
  1368.     kControlPopupButtonMenuIDTag = 'mnid';                        {  SInt16 }
  1369.  
  1370. { These tags are available in 1.1 or later of Appearance }
  1371.     kControlPopupButtonExtraHeightTag = 'exht';                    {  SInt16 extra vertical whitespace within the button }
  1372.  
  1373.  
  1374. {——————————————————————————————————————————————————————————————————————————————————————}
  1375. {    • RADIO GROUP (CDEF 26)                                                                }
  1376. {——————————————————————————————————————————————————————————————————————————————————————}
  1377. {    This control implements a radio group. It is an embedding control and can therefore    }
  1378. {     only be used when a control hierarchy is established for its owning window. You        }
  1379. {    should only embed radio buttons within it. As radio buttons are embedded into it,    }
  1380. {    the group sets up its value, min, and max to represent the number of embedded items.}
  1381. {    The current value of the control is the index of the sub-control that is the current}
  1382. {    'on' radio button. To get the current radio button control handle, you can use the    }
  1383. {    control manager call GetIndSubControl, passing in the value of the radio group.        }
  1384. {                                                                                        }
  1385. {    NOTE: This control is only available with Appearance 1.0.1.                            }
  1386.     kControlRadioGroupProc        = 416;
  1387.  
  1388. {——————————————————————————————————————————————————————————————————————————————————————}
  1389. {    • SCROLL TEXT BOX (CDEF 27)                                                            }
  1390. {——————————————————————————————————————————————————————————————————————————————————————}
  1391. {    This control implements a scrolling box of (non-editable) text.    This is useful for    }
  1392. {    credits in about boxes, etc.                                                        }
  1393. {    The standard version of this control has a scroll bar, but the autoscrolling        }
  1394. {    variant does not. The autoscrolling variant needs two pieces of information to        }
  1395. {    work: delay (in ticks) before the scrolling starts, and time (in ticks) between        }
  1396. {    scrolls. It will scroll one pixel at a time, unless changed via SetControlData.        }
  1397. {                                                                                        }
  1398. {    Parameter                    What Goes Here                                            }
  1399. {    ———————————————————            ————————————————————————————————————————————————————    }
  1400. {    Value                        Resource ID of 'TEXT'/'styl' content.                    }
  1401. {    Min                            Scroll start delay (in ticks)                        .    }
  1402. {    Max                            Delay (in ticks) between scrolls.                        }
  1403. {                                                                                        }
  1404. {    NOTE: This control is only available with Appearance 1.1.                            }
  1405.     kControlScrollTextBoxProc    = 432;
  1406.     kControlScrollTextBoxAutoScrollProc = 433;
  1407.  
  1408.     kControlScrollTextBoxDelayBeforeAutoScrollTag = 'stdl';        {  UInt32 (ticks until autoscrolling starts) }
  1409.     kControlScrollTextBoxDelayBetweenAutoScrollTag = 'scdl';    {  UInt32 (ticks between scrolls) }
  1410.     kControlScrollTextBoxAutoScrollAmountTag = 'samt';            {  UInt16 (pixels per scroll) -- defaults to 1 }
  1411.     kControlScrollTextBoxContentsTag = 'tres';                    {  SInt16 (resource ID of 'TEXT'/'styl') -- write only! }
  1412.  
  1413.  
  1414. {   —— end of stuff only available with Appearance 1.0 and later }
  1415.  
  1416.  
  1417. {——————————————————————————————————————————————————————————————————————————————————————}
  1418. {    • Control Variants                                                                    }
  1419. {——————————————————————————————————————————————————————————————————————————————————————}
  1420.  
  1421. TYPE
  1422.     ControlVariant                        = SInt16;
  1423.  
  1424. CONST
  1425.     kControlNoVariant            = 0;                            {  No variant }
  1426.     kControlUsesOwningWindowsFontVariant = $08;                    {  Control uses owning windows font to display text }
  1427.  
  1428. {——————————————————————————————————————————————————————————————————————————————————————}
  1429. {    • Control Part Codes                                                                }
  1430. {——————————————————————————————————————————————————————————————————————————————————————}
  1431.     kControlNoPart                = 0;
  1432.     kControlLabelPart            = 1;
  1433.     kControlMenuPart            = 2;
  1434.     kControlTrianglePart        = 4;
  1435.     kControlEditTextPart        = 5;                            {  Appearance 1.0 and later }
  1436.     kControlPicturePart            = 6;                            {  Appearance 1.0 and later }
  1437.     kControlIconPart            = 7;                            {  Appearance 1.0 and later }
  1438.     kControlClockPart            = 8;                            {  Appearance 1.0 and later }
  1439.     kControlListBoxPart            = 24;                            {  Appearance 1.0 and later }
  1440.     kControlListBoxDoubleClickPart = 25;                        {  Appearance 1.0 and later }
  1441.     kControlImageWellPart        = 26;                            {  Appearance 1.0 and later }
  1442.     kControlRadioGroupPart        = 27;                            {  Appearance 1.0.2 and later }
  1443.     kControlButtonPart            = 10;
  1444.     kControlCheckBoxPart        = 11;
  1445.     kControlRadioButtonPart        = 11;
  1446.     kControlUpButtonPart        = 20;
  1447.     kControlDownButtonPart        = 21;
  1448.     kControlPageUpPart            = 22;
  1449.     kControlPageDownPart        = 23;
  1450.     kControlIndicatorPart        = 129;
  1451.     kControlDisabledPart        = 254;
  1452.     kControlInactivePart        = 255;
  1453.  
  1454.     kControlClockHourDayPart    = 9;                            {  Appearance 1.1 and later }
  1455.     kControlClockMinuteMonthPart = 10;                            {  Appearance 1.1 and later }
  1456.     kControlClockSecondYearPart    = 11;                            {  Appearance 1.1 and later }
  1457.     kControlClockAMPMPart        = 12;                            {  Appearance 1.1 and later }
  1458.  
  1459. {——————————————————————————————————————————————————————————————————————————————————————}
  1460. {     Meta-Parts                                                                            }
  1461. {
  1462. /*     If you haven't guessed from looking at other toolbox headers. We like the word         }
  1463. {    'meta'. It's cool. So here's one more for you. A meta-part is a part used in a call    }
  1464. {     to the GetControlRegion API. These parts are parts that might be defined by a        }
  1465. {    control, but should not be returned from calls like TestControl, et al. They define    }
  1466. {     a region of a control, presently the structure and the content region. The content    }
  1467. {     region is only defined by controls that can embed other controls. It is the area    }
  1468. {     that embedded content can live.                                                        }
  1469. {                                                                                        }
  1470. {    Along with these parts, you can also pass in normal part codes to get the regions    }
  1471. {     of the parts. Not all controls fully support this at the time this was written.        }
  1472. {——————————————————————————————————————————————————————————————————————————————————————}
  1473.     kControlStructureMetaPart    = -1;
  1474.     kControlContentMetaPart        = -2;
  1475.  
  1476.  
  1477. {——————————————————————————————————————————————————————————————————————————————————————}
  1478. {    • Check Box Values                                                                    }
  1479. {——————————————————————————————————————————————————————————————————————————————————————}
  1480.     kControlCheckBoxUncheckedValue = 0;
  1481.     kControlCheckBoxCheckedValue = 1;
  1482.     kControlCheckBoxMixedValue    = 2;
  1483.  
  1484. {——————————————————————————————————————————————————————————————————————————————————————}
  1485. {    • Radio Button Values                                                                }
  1486. {——————————————————————————————————————————————————————————————————————————————————————}
  1487.     kControlRadioButtonUncheckedValue = 0;
  1488.     kControlRadioButtonCheckedValue = 1;
  1489.     kControlRadioButtonMixedValue = 2;
  1490.  
  1491. {——————————————————————————————————————————————————————————————————————————————————————}
  1492. {    • Pop-Up Menu Control Constants                                                        }
  1493. {——————————————————————————————————————————————————————————————————————————————————————}
  1494. {  Variant codes for the System 7 pop-up menu }
  1495.     popupFixedWidth                = $01;
  1496.     popupVariableWidth            = $02;
  1497.     popupUseAddResMenu            = $04;
  1498.     popupUseWFont                = $08;
  1499.  
  1500. {  Menu label styles for the System 7 pop-up menu }
  1501.     popupTitleBold                = $0100;
  1502.     popupTitleItalic            = $0200;
  1503.     popupTitleUnderline            = $0400;
  1504.     popupTitleOutline            = $0800;
  1505.     popupTitleShadow            = $1000;
  1506.     popupTitleCondense            = $2000;
  1507.     popupTitleExtend            = $4000;
  1508.     popupTitleNoStyle            = $8000;
  1509.  
  1510. {  Menu label justifications for the System 7 pop-up menu }
  1511.     popupTitleLeftJust            = $00000000;
  1512.     popupTitleCenterJust        = $00000001;
  1513.     popupTitleRightJust            = $000000FF;
  1514.  
  1515. {——————————————————————————————————————————————————————————————————————————————————————}
  1516. {     • DragGrayRgn Constatns                                                                }
  1517. {                                                                                        }
  1518. {   For DragGrayRgnUPP used in TrackControl()                                             }
  1519. {——————————————————————————————————————————————————————————————————————————————————————}
  1520.     noConstraint                = 0;
  1521.     hAxisOnly                    = 1;
  1522.     vAxisOnly                    = 2;
  1523.  
  1524. {——————————————————————————————————————————————————————————————————————————————————————}
  1525. {    • Control Creation/Deletion                                                            }
  1526. {——————————————————————————————————————————————————————————————————————————————————————}
  1527. FUNCTION NewControl(owningWindow: WindowPtr; {CONST}VAR boundsRect: Rect; controlTitle: Str255; initiallyVisible: BOOLEAN; initialValue: SInt16; minimumValue: SInt16; maximumValue: SInt16; procID: SInt16; controlReference: SInt32): ControlHandle;
  1528.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1529.     INLINE $A954;
  1530.     {$ENDC}
  1531. FUNCTION GetNewControl(resourceID: SInt16; owningWindow: WindowPtr): ControlHandle;
  1532.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1533.     INLINE $A9BE;
  1534.     {$ENDC}
  1535. PROCEDURE DisposeControl(theControl: ControlHandle);
  1536.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1537.     INLINE $A955;
  1538.     {$ENDC}
  1539. PROCEDURE KillControls(theWindow: WindowPtr);
  1540.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1541.     INLINE $A956;
  1542.     {$ENDC}
  1543. {——————————————————————————————————————————————————————————————————————————————————————}
  1544. {    • Control Visible State                                                                }
  1545. {——————————————————————————————————————————————————————————————————————————————————————}
  1546. PROCEDURE HiliteControl(theControl: ControlHandle; hiliteState: ControlPartCode);
  1547.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1548.     INLINE $A95D;
  1549.     {$ENDC}
  1550. PROCEDURE ShowControl(theControl: ControlHandle);
  1551.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1552.     INLINE $A957;
  1553.     {$ENDC}
  1554. PROCEDURE HideControl(theControl: ControlHandle);
  1555.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1556.     INLINE $A958;
  1557.     {$ENDC}
  1558.  
  1559. {  following state routines available only with Appearance 1.0 and later }
  1560. FUNCTION IsControlActive(inControl: ControlHandle): BOOLEAN;
  1561.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1562.     INLINE $303C, $0005, $AA73;
  1563.     {$ENDC}
  1564. FUNCTION IsControlVisible(inControl: ControlHandle): BOOLEAN;
  1565.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1566.     INLINE $303C, $0006, $AA73;
  1567.     {$ENDC}
  1568. FUNCTION ActivateControl(inControl: ControlHandle): OSErr;
  1569.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1570.     INLINE $303C, $0007, $AA73;
  1571.     {$ENDC}
  1572. FUNCTION DeactivateControl(inControl: ControlHandle): OSErr;
  1573.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1574.     INLINE $303C, $0008, $AA73;
  1575.     {$ENDC}
  1576. FUNCTION SetControlVisibility(inControl: ControlHandle; inIsVisible: BOOLEAN; inDoDraw: BOOLEAN): OSErr;
  1577.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1578.     INLINE $303C, $001E, $AA73;
  1579.     {$ENDC}
  1580.  
  1581. {——————————————————————————————————————————————————————————————————————————————————————}
  1582. {    • Control Imaging                                                                    }
  1583. {——————————————————————————————————————————————————————————————————————————————————————}
  1584. PROCEDURE DrawControls(theWindow: WindowPtr);
  1585.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1586.     INLINE $A969;
  1587.     {$ENDC}
  1588. PROCEDURE Draw1Control(theControl: ControlHandle);
  1589.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1590.     INLINE $A96D;
  1591.     {$ENDC}
  1592.  
  1593. PROCEDURE UpdateControls(theWindow: WindowPtr; updateRegion: RgnHandle);
  1594.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1595.     INLINE $A953;
  1596.     {$ENDC}
  1597.  
  1598. {  following imaging routines available only with Appearance 1.0 and later }
  1599. FUNCTION GetBestControlRect(inControl: ControlHandle; VAR outRect: Rect; VAR outBaseLineOffset: SInt16): OSErr;
  1600.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1601.     INLINE $303C, $001B, $AA73;
  1602.     {$ENDC}
  1603. FUNCTION SetControlFontStyle(inControl: ControlHandle; {CONST}VAR inStyle: ControlFontStyleRec): OSErr;
  1604.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1605.     INLINE $303C, $001C, $AA73;
  1606.     {$ENDC}
  1607. PROCEDURE DrawControlInCurrentPort(inControl: ControlHandle);
  1608.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1609.     INLINE $303C, $0018, $AA73;
  1610.     {$ENDC}
  1611. FUNCTION SetUpControlBackground(inControl: ControlHandle; inDepth: SInt16; inIsColorDevice: BOOLEAN): OSErr;
  1612.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1613.     INLINE $303C, $001D, $AA73;
  1614.     {$ENDC}
  1615. {  SetUpControlTextColor is available in Appearance 1.1 or later. }
  1616. FUNCTION SetUpControlTextColor(inControl: ControlHandle; inDepth: SInt16; inIsColorDevice: BOOLEAN): OSErr;
  1617.  
  1618. {——————————————————————————————————————————————————————————————————————————————————————}
  1619. {    • Control Mousing                                                                    }
  1620. {——————————————————————————————————————————————————————————————————————————————————————}
  1621. {
  1622.     NOTE ON CONTROL ACTION PROCS
  1623.  
  1624.     When using the TrackControl() call when tracking an indicator, the actionProc parameter
  1625.     (type ControlActionUPP) should be replaced by a parameter of type DragGrayRgnUPP
  1626.     (see Quickdraw.h).
  1627.  
  1628.     If, however, you are using the live feedback variants of scroll bars or sliders, you
  1629.     can pass a ControlActionUPP in when tracking the indicator as well. This functionality
  1630.     is available in Appearance 1.0 or later.
  1631. }
  1632. FUNCTION TrackControl(theControl: ControlHandle; startPoint: Point; actionProc: ControlActionUPP): ControlPartCode;
  1633.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1634.     INLINE $A968;
  1635.     {$ENDC}
  1636. PROCEDURE DragControl(theControl: ControlHandle; startPoint: Point; {CONST}VAR limitRect: Rect; {CONST}VAR slopRect: Rect; axis: DragConstraint);
  1637.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1638.     INLINE $A967;
  1639.     {$ENDC}
  1640. FUNCTION TestControl(theControl: ControlHandle; testPoint: Point): ControlPartCode;
  1641.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1642.     INLINE $A966;
  1643.     {$ENDC}
  1644. FUNCTION FindControl(testPoint: Point; theWindow: WindowPtr; VAR theControl: ControlHandle): ControlPartCode;
  1645.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1646.     INLINE $A96C;
  1647.     {$ENDC}
  1648. { The following mousing routines available only with Appearance 1.0 and later    }
  1649. {                                                                                }
  1650. { FindControlUnderMouse is preferrable to TrackControl when running under        }
  1651. { Appearance 1.0 as you can pass in modifiers, which some of the new controls    }
  1652. { use, such as edit text and list boxes.                                        }
  1653. FUNCTION FindControlUnderMouse(inWhere: Point; inWindow: WindowPtr; VAR outPart: SInt16): ControlHandle;
  1654.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1655.     INLINE $303C, $0009, $AA73;
  1656.     {$ENDC}
  1657. FUNCTION HandleControlClick(inControl: ControlHandle; inWhere: Point; inModifiers: SInt16; inAction: ControlActionUPP): ControlPartCode;
  1658.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1659.     INLINE $303C, $000A, $AA73;
  1660.     {$ENDC}
  1661.  
  1662.  
  1663.  
  1664. {——————————————————————————————————————————————————————————————————————————————————————}
  1665. {    • Control Events (available only with Appearance 1.0 and later)                        }
  1666. {——————————————————————————————————————————————————————————————————————————————————————}
  1667. FUNCTION HandleControlKey(inControl: ControlHandle; inKeyCode: SInt16; inCharCode: SInt16; inModifiers: SInt16): SInt16;
  1668.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1669.     INLINE $303C, $000B, $AA73;
  1670.     {$ENDC}
  1671. PROCEDURE IdleControls(inWindow: WindowPtr);
  1672.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1673.     INLINE $303C, $000C, $AA73;
  1674.     {$ENDC}
  1675.  
  1676.  
  1677. {——————————————————————————————————————————————————————————————————————————————————————}
  1678. {    • Control Positioning                                                                }
  1679. {——————————————————————————————————————————————————————————————————————————————————————}
  1680. PROCEDURE MoveControl(theControl: ControlHandle; h: SInt16; v: SInt16);
  1681.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1682.     INLINE $A959;
  1683.     {$ENDC}
  1684. PROCEDURE SizeControl(theControl: ControlHandle; w: SInt16; h: SInt16);
  1685.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1686.     INLINE $A95C;
  1687.     {$ENDC}
  1688. {——————————————————————————————————————————————————————————————————————————————————————}
  1689. {    • Control Title                                                                        }
  1690. {——————————————————————————————————————————————————————————————————————————————————————}
  1691. PROCEDURE SetControlTitle(theControl: ControlHandle; title: Str255);
  1692.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1693.     INLINE $A95F;
  1694.     {$ENDC}
  1695. PROCEDURE GetControlTitle(theControl: ControlHandle; VAR title: Str255);
  1696.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1697.     INLINE $A95E;
  1698.     {$ENDC}
  1699. {——————————————————————————————————————————————————————————————————————————————————————}
  1700. {    • Control Value                                                                        }
  1701. {——————————————————————————————————————————————————————————————————————————————————————}
  1702. FUNCTION GetControlValue(theControl: ControlHandle): SInt16;
  1703.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1704.     INLINE $A960;
  1705.     {$ENDC}
  1706. PROCEDURE SetControlValue(theControl: ControlHandle; newValue: SInt16);
  1707.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1708.     INLINE $A963;
  1709.     {$ENDC}
  1710. FUNCTION GetControlMinimum(theControl: ControlHandle): SInt16;
  1711.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1712.     INLINE $A961;
  1713.     {$ENDC}
  1714. PROCEDURE SetControlMinimum(theControl: ControlHandle; newMinimum: SInt16);
  1715.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1716.     INLINE $A964;
  1717.     {$ENDC}
  1718. FUNCTION GetControlMaximum(theControl: ControlHandle): SInt16;
  1719.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1720.     INLINE $A962;
  1721.     {$ENDC}
  1722. PROCEDURE SetControlMaximum(theControl: ControlHandle; newMaximum: SInt16);
  1723.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1724.     INLINE $A965;
  1725.     {$ENDC}
  1726.  
  1727. {  proportional scrolling/32-bit value support is new with Appearance 1.1 }
  1728.  
  1729. FUNCTION GetControlViewSize(theControl: ControlHandle): SInt32;
  1730. PROCEDURE SetControlViewSize(theControl: ControlHandle; newViewSize: SInt32);
  1731. FUNCTION GetControl32BitValue(theControl: ControlHandle): SInt32;
  1732. PROCEDURE SetControl32BitValue(theControl: ControlHandle; newValue: SInt32);
  1733. FUNCTION GetControl32BitMaximum(theControl: ControlHandle): SInt32;
  1734. PROCEDURE SetControl32BitMaximum(theControl: ControlHandle; newMaximum: SInt32);
  1735. FUNCTION GetControl32BitMinimum(theControl: ControlHandle): SInt32;
  1736. PROCEDURE SetControl32BitMinimum(theControl: ControlHandle; newMinimum: SInt32);
  1737. {
  1738.        IsValidControlHandle will tell you if the handle you pass in belongs to a control
  1739.       the Control Manager knows about. It does not sanity check the data in the control.
  1740. }
  1741.  
  1742. FUNCTION IsValidControlHandle(theControl: ControlHandle): BOOLEAN;
  1743. {——————————————————————————————————————————————————————————————————————————————————————}
  1744. { • Properties                                                                            }
  1745. {——————————————————————————————————————————————————————————————————————————————————————}
  1746. FUNCTION GetControlProperty(control: ControlHandle; propertyCreator: OSType; propertyTag: OSType; bufferSize: UInt32; VAR actualSize: UInt32; propertyBuffer: UNIV Ptr): OSStatus;
  1747. FUNCTION GetControlPropertySize(control: ControlHandle; propertyCreator: OSType; propertyTag: OSType; VAR size: UInt32): OSStatus;
  1748. FUNCTION SetControlProperty(control: ControlHandle; propertyCreator: OSType; propertyTag: OSType; propertySize: UInt32; propertyData: UNIV Ptr): OSStatus;
  1749. FUNCTION RemoveControlProperty(control: ControlHandle; propertyCreator: OSType; propertyTag: OSType): OSStatus;
  1750.  
  1751. {——————————————————————————————————————————————————————————————————————————————————————}
  1752. {    • Control Regions (Appearance 1.1 or later)                                            }
  1753. {                                                                                        }
  1754. {    See the discussion on meta-parts in this header for more information                }
  1755. {——————————————————————————————————————————————————————————————————————————————————————}
  1756. FUNCTION GetControlRegion(inControl: ControlHandle; inPart: ControlPartCode; outRegion: RgnHandle): OSStatus;
  1757.  
  1758.  
  1759. {——————————————————————————————————————————————————————————————————————————————————————}
  1760. {    • Control Variant                                                                    }
  1761. {——————————————————————————————————————————————————————————————————————————————————————}
  1762. FUNCTION GetControlVariant(theControl: ControlHandle): ControlVariant;
  1763.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1764.     INLINE $A809;
  1765.     {$ENDC}
  1766. {——————————————————————————————————————————————————————————————————————————————————————}
  1767. {    • Control Action                                                                    }
  1768. {——————————————————————————————————————————————————————————————————————————————————————}
  1769. PROCEDURE SetControlAction(theControl: ControlHandle; actionProc: ControlActionUPP);
  1770.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1771.     INLINE $A96B;
  1772.     {$ENDC}
  1773. FUNCTION GetControlAction(theControl: ControlHandle): ControlActionUPP;
  1774.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1775.     INLINE $A96A;
  1776.     {$ENDC}
  1777. {——————————————————————————————————————————————————————————————————————————————————————}
  1778. { • Control Accessors                                                                    }
  1779. {——————————————————————————————————————————————————————————————————————————————————————}
  1780. PROCEDURE SetControlReference(theControl: ControlHandle; data: SInt32);
  1781.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1782.     INLINE $A95B;
  1783.     {$ENDC}
  1784. FUNCTION GetControlReference(theControl: ControlHandle): SInt32;
  1785.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1786.     INLINE $A95A;
  1787.     {$ENDC}
  1788. FUNCTION GetAuxiliaryControlRecord(theControl: ControlHandle; VAR acHndl: AuxCtlHandle): BOOLEAN;
  1789.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1790.     INLINE $AA44;
  1791.     {$ENDC}
  1792. PROCEDURE SetControlColor(theControl: ControlHandle; newColorTable: CCTabHandle);
  1793.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1794.     INLINE $AA43;
  1795.     {$ENDC}
  1796. {——————————————————————————————————————————————————————————————————————————————————————}
  1797. {    • HELPERS (available only with Appearance 1.0 and later)                            }
  1798. {                                                                                        }
  1799. { These routines are available only thru the shared library/glue                        }
  1800. { Bevel button routines                                                                }
  1801. {——————————————————————————————————————————————————————————————————————————————————————}
  1802.  
  1803. FUNCTION GetBevelButtonMenuValue(inButton: ControlHandle; VAR outValue: SInt16): OSErr;
  1804. FUNCTION SetBevelButtonMenuValue(inButton: ControlHandle; inValue: SInt16): OSErr;
  1805. FUNCTION GetBevelButtonMenuHandle(inButton: ControlHandle; VAR outHandle: MenuHandle): OSErr;
  1806. FUNCTION GetBevelButtonContentInfo(inButton: ControlHandle; outContent: ControlButtonContentInfoPtr): OSErr;
  1807. FUNCTION SetBevelButtonContentInfo(inButton: ControlHandle; inContent: ControlButtonContentInfoPtr): OSErr;
  1808. FUNCTION SetBevelButtonTransform(inButton: ControlHandle; transform: IconTransformType): OSErr;
  1809. FUNCTION SetBevelButtonGraphicAlignment(inButton: ControlHandle; inAlign: ControlButtonGraphicAlignment; inHOffset: SInt16; inVOffset: SInt16): OSErr;
  1810. FUNCTION SetBevelButtonTextAlignment(inButton: ControlHandle; inAlign: ControlButtonTextAlignment; inHOffset: SInt16): OSErr;
  1811. FUNCTION SetBevelButtonTextPlacement(inButton: ControlHandle; inWhere: ControlButtonTextPlacement): OSErr;
  1812. {  Image well routines }
  1813.  
  1814. FUNCTION GetImageWellContentInfo(inButton: ControlHandle; outContent: ControlButtonContentInfoPtr): OSErr;
  1815. FUNCTION SetImageWellContentInfo(inButton: ControlHandle; inContent: ControlButtonContentInfoPtr): OSErr;
  1816. FUNCTION SetImageWellTransform(inButton: ControlHandle; inTransform: IconTransformType): OSErr;
  1817. {  Tab routines }
  1818.  
  1819. FUNCTION GetTabContentRect(inTabControl: ControlHandle; VAR outContentRect: Rect): OSErr;
  1820. FUNCTION SetTabEnabled(inTabControl: ControlHandle; inTabToHilite: SInt16; inEnabled: BOOLEAN): OSErr;
  1821. {  Disclosure triangles }
  1822.  
  1823. FUNCTION SetDisclosureTriangleLastValue(inTabControl: ControlHandle; inValue: SInt16): OSErr;
  1824. {——————————————————————————————————————————————————————————————————————————————————————}
  1825. {    • Control Hierarchy (Appearance 1.0 and later only)                                    }
  1826. {——————————————————————————————————————————————————————————————————————————————————————}
  1827. FUNCTION SendControlMessage(inControl: ControlHandle; inMessage: SInt16; inParam: SInt32): SInt32;
  1828.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1829.     INLINE $303C, $FFFE, $AA73;
  1830.     {$ENDC}
  1831. FUNCTION DumpControlHierarchy(inWindow: WindowPtr; {CONST}VAR inDumpFile: FSSpec): OSErr;
  1832.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1833.     INLINE $303C, $FFFF, $AA73;
  1834.     {$ENDC}
  1835. FUNCTION CreateRootControl(inWindow: WindowPtr; VAR outControl: ControlHandle): OSErr;
  1836.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1837.     INLINE $303C, $0001, $AA73;
  1838.     {$ENDC}
  1839. FUNCTION GetRootControl(inWindow: WindowPtr; VAR outControl: ControlHandle): OSErr;
  1840.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1841.     INLINE $303C, $0002, $AA73;
  1842.     {$ENDC}
  1843. FUNCTION EmbedControl(inControl: ControlHandle; inContainer: ControlHandle): OSErr;
  1844.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1845.     INLINE $303C, $0003, $AA73;
  1846.     {$ENDC}
  1847. FUNCTION AutoEmbedControl(inControl: ControlHandle; inWindow: WindowPtr): OSErr;
  1848.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1849.     INLINE $303C, $0004, $AA73;
  1850.     {$ENDC}
  1851. FUNCTION GetSuperControl(inControl: ControlHandle; VAR outParent: ControlHandle): OSErr;
  1852.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1853.     INLINE $303C, $0015, $AA73;
  1854.     {$ENDC}
  1855. FUNCTION CountSubControls(inControl: ControlHandle; VAR outNumChildren: UInt16): OSErr;
  1856.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1857.     INLINE $303C, $0016, $AA73;
  1858.     {$ENDC}
  1859. FUNCTION GetIndexedSubControl(inControl: ControlHandle; inIndex: UInt16; VAR outSubControl: ControlHandle): OSErr;
  1860.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1861.     INLINE $303C, $0017, $AA73;
  1862.     {$ENDC}
  1863. FUNCTION SetControlSupervisor(inControl: ControlHandle; inBoss: ControlHandle): OSErr;
  1864.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1865.     INLINE $303C, $001A, $AA73;
  1866.     {$ENDC}
  1867.  
  1868.  
  1869. {——————————————————————————————————————————————————————————————————————————————————————}
  1870. {    • Keyboard Focus (available only with Appearance 1.0 and later)                        }
  1871. {——————————————————————————————————————————————————————————————————————————————————————}
  1872. FUNCTION GetKeyboardFocus(inWindow: WindowPtr; VAR outControl: ControlHandle): OSErr;
  1873.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1874.     INLINE $303C, $000D, $AA73;
  1875.     {$ENDC}
  1876. FUNCTION SetKeyboardFocus(inWindow: WindowPtr; inControl: ControlHandle; inPart: ControlFocusPart): OSErr;
  1877.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1878.     INLINE $303C, $000E, $AA73;
  1879.     {$ENDC}
  1880. FUNCTION AdvanceKeyboardFocus(inWindow: WindowPtr): OSErr;
  1881.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1882.     INLINE $303C, $000F, $AA73;
  1883.     {$ENDC}
  1884. FUNCTION ReverseKeyboardFocus(inWindow: WindowPtr): OSErr;
  1885.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1886.     INLINE $303C, $0010, $AA73;
  1887.     {$ENDC}
  1888. FUNCTION ClearKeyboardFocus(inWindow: WindowPtr): OSErr;
  1889.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1890.     INLINE $303C, $0019, $AA73;
  1891.     {$ENDC}
  1892.  
  1893.  
  1894. {——————————————————————————————————————————————————————————————————————————————————————}
  1895. {    • Control Data (available only with Appearance 1.0 and later)                        }
  1896. {——————————————————————————————————————————————————————————————————————————————————————}
  1897.  
  1898. FUNCTION GetControlFeatures(inControl: ControlHandle; VAR outFeatures: UInt32): OSErr;
  1899.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1900.     INLINE $303C, $0011, $AA73;
  1901.     {$ENDC}
  1902. FUNCTION SetControlData(inControl: ControlHandle; inPart: ControlPartCode; inTagName: ResType; inSize: Size; inData: Ptr): OSErr;
  1903.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1904.     INLINE $303C, $0012, $AA73;
  1905.     {$ENDC}
  1906. FUNCTION GetControlData(inControl: ControlHandle; inPart: ControlPartCode; inTagName: ResType; inBufferSize: Size; inBuffer: Ptr; VAR outActualSize: Size): OSErr;
  1907.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1908.     INLINE $303C, $0013, $AA73;
  1909.     {$ENDC}
  1910. FUNCTION GetControlDataSize(inControl: ControlHandle; inPart: ControlPartCode; inTagName: ResType; VAR outMaxSize: Size): OSErr;
  1911.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1912.     INLINE $303C, $0014, $AA73;
  1913.     {$ENDC}
  1914.  
  1915.  
  1916.  
  1917. {——————————————————————————————————————————————————————————————————————————————————————}
  1918. {    • ‘CDEF’ messages                                                                    }
  1919. {——————————————————————————————————————————————————————————————————————————————————————}
  1920.  
  1921. TYPE
  1922.     ControlDefProcMessage                = SInt16;
  1923.  
  1924. CONST
  1925.     drawCntl                    = 0;
  1926.     testCntl                    = 1;
  1927.     calcCRgns                    = 2;
  1928.     initCntl                    = 3;
  1929.     dispCntl                    = 4;
  1930.     posCntl                        = 5;
  1931.     thumbCntl                    = 6;
  1932.     dragCntl                    = 7;
  1933.     autoTrack                    = 8;
  1934.     calcCntlRgn                    = 10;
  1935.     calcThumbRgn                = 11;
  1936.     drawThumbOutline            = 12;
  1937.  
  1938. {——————————————————————————————————————————————————————————————————————————————————————}
  1939. {    • ‘CDEF’ entrypoint                                                                    }
  1940. {——————————————————————————————————————————————————————————————————————————————————————}
  1941.  
  1942. TYPE
  1943. {$IFC TYPED_FUNCTION_POINTERS}
  1944.     ControlDefProcPtr = FUNCTION(varCode: SInt16; theControl: ControlHandle; message: ControlDefProcMessage; param: SInt32): SInt32;
  1945. {$ELSEC}
  1946.     ControlDefProcPtr = ProcPtr;
  1947. {$ENDC}
  1948.  
  1949.     ControlDefUPP = UniversalProcPtr;
  1950.  
  1951. CONST
  1952.     uppControlDefProcInfo = $00003BB0;
  1953.  
  1954. FUNCTION NewControlDefProc(userRoutine: ControlDefProcPtr): ControlDefUPP;
  1955.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1956.     INLINE $2E9F;
  1957.     {$ENDC}
  1958.  
  1959. FUNCTION CallControlDefProc(varCode: SInt16; theControl: ControlHandle; message: ControlDefProcMessage; param: SInt32; userRoutine: ControlDefUPP): SInt32;
  1960.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1961.     INLINE $205F, $4E90;
  1962.     {$ENDC}
  1963. {——————————————————————————————————————————————————————————————————————————————————————}
  1964. {    • Constants for drawCntl message (passed in param)                                    }
  1965. {——————————————————————————————————————————————————————————————————————————————————————}
  1966.  
  1967. CONST
  1968.     kDrawControlEntireControl    = 0;
  1969.     kDrawControlIndicatorOnly    = 129;
  1970.  
  1971. {——————————————————————————————————————————————————————————————————————————————————————}
  1972. {    • Constants for dragCntl message (passed in param)                                    }
  1973. {——————————————————————————————————————————————————————————————————————————————————————}
  1974.     kDragControlEntireControl    = 0;
  1975.     kDragControlIndicator        = 1;
  1976.  
  1977. {——————————————————————————————————————————————————————————————————————————————————————}
  1978. {    • Drag Constraint Structure for thumbCntl message (passed in param)                    }
  1979. {——————————————————————————————————————————————————————————————————————————————————————}
  1980.  
  1981. TYPE
  1982.     IndicatorDragConstraintPtr = ^IndicatorDragConstraint;
  1983.     IndicatorDragConstraint = RECORD
  1984.         limitRect:                Rect;
  1985.         slopRect:                Rect;
  1986.         axis:                    DragConstraint;
  1987.     END;
  1988.  
  1989.     IndicatorDragConstraintHandle        = ^IndicatorDragConstraintPtr;
  1990. {$IFC NOT TARGET_OS_MAC }
  1991. {——————————————————————————————————————————————————————————————————————————————————————}
  1992. {    • QuickTime 3.0 Win32/unix notification    mechanism                                    }
  1993. {——————————————————————————————————————————————————————————————————————————————————————}
  1994. {  Proc used to notify window that something happened to the control }
  1995. {$IFC TYPED_FUNCTION_POINTERS}
  1996.     ControlNotificationProcPtr = PROCEDURE(theWindow: WindowPtr; theControl: ControlHandle; notification: ControlNotification; param1: LONGINT; param2: LONGINT); C;
  1997. {$ELSEC}
  1998.     ControlNotificationProcPtr = ProcPtr;
  1999. {$ENDC}
  2000.  
  2001. {
  2002.    Proc used to prefilter events before handled by control.  A client of a control calls
  2003.    CTRLSetPreFilterProc() to have the control call this proc before handling the event.
  2004.    If the proc returns TRUE, the control can go ahead and handle the event.
  2005. }
  2006. {$IFC TYPED_FUNCTION_POINTERS}
  2007.     PreFilterEventProc = FUNCTION(theControl: ControlHandle; VAR theEvent: EventRecord): BOOLEAN; C;
  2008. {$ELSEC}
  2009.     PreFilterEventProc = ProcPtr;
  2010. {$ENDC}
  2011.  
  2012. FUNCTION GetControlComponentInstance(theControl: ControlHandle): LONGINT; C;
  2013. FUNCTION GetControlHandleFromCookie(cookie: LONGINT): ControlHandle; C;
  2014. PROCEDURE SetControlDefProc(resID: INTEGER; proc: ControlDefProcPtr); C;
  2015. {$ENDC}
  2016.  
  2017. {$IFC OLDROUTINENAMES }
  2018. {——————————————————————————————————————————————————————————————————————————————————————}
  2019. {    • OLDROUTINENAMES                                                                    }
  2020. {——————————————————————————————————————————————————————————————————————————————————————}
  2021. {  Variants applicable to all controls (at least ones with text) }
  2022.  
  2023. CONST
  2024.     useWFont                    = $08;
  2025.  
  2026.     inLabel                        = 1;
  2027.     inMenu                        = 2;
  2028.     inTriangle                    = 4;
  2029.     inButton                    = 10;
  2030.     inCheckBox                    = 11;
  2031.     inUpButton                    = 20;
  2032.     inDownButton                = 21;
  2033.     inPageUp                    = 22;
  2034.     inPageDown                    = 23;
  2035.     inThumb                        = 129;
  2036.  
  2037.     kNoHiliteControlPart        = 0;
  2038.     kInLabelControlPart            = 1;
  2039.     kInMenuControlPart            = 2;
  2040.     kInTriangleControlPart        = 4;
  2041.     kInButtonControlPart        = 10;
  2042.     kInCheckBoxControlPart        = 11;
  2043.     kInUpButtonControlPart        = 20;
  2044.     kInDownButtonControlPart    = 21;
  2045.     kInPageUpControlPart        = 22;
  2046.     kInPageDownControlPart        = 23;
  2047.     kInIndicatorControlPart        = 129;
  2048.     kReservedControlPart        = 254;
  2049.     kControlInactiveControlPart    = 255;
  2050.  
  2051. PROCEDURE SetCTitle(theControl: ControlHandle; title: Str255);
  2052.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2053.     INLINE $A95F;
  2054.     {$ENDC}
  2055. PROCEDURE GetCTitle(theControl: ControlHandle; VAR title: Str255);
  2056.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2057.     INLINE $A95E;
  2058.     {$ENDC}
  2059. PROCEDURE UpdtControl(theWindow: WindowPtr; updateRgn: RgnHandle);
  2060.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2061.     INLINE $A953;
  2062.     {$ENDC}
  2063. PROCEDURE SetCtlValue(theControl: ControlHandle; theValue: INTEGER);
  2064.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2065.     INLINE $A963;
  2066.     {$ENDC}
  2067. FUNCTION GetCtlValue(theControl: ControlHandle): INTEGER;
  2068.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2069.     INLINE $A960;
  2070.     {$ENDC}
  2071. PROCEDURE SetCtlMin(theControl: ControlHandle; minValue: INTEGER);
  2072.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2073.     INLINE $A964;
  2074.     {$ENDC}
  2075. FUNCTION GetCtlMin(theControl: ControlHandle): INTEGER;
  2076.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2077.     INLINE $A961;
  2078.     {$ENDC}
  2079. PROCEDURE SetCtlMax(theControl: ControlHandle; maxValue: INTEGER);
  2080.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2081.     INLINE $A965;
  2082.     {$ENDC}
  2083. FUNCTION GetCtlMax(theControl: ControlHandle): INTEGER;
  2084.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2085.     INLINE $A962;
  2086.     {$ENDC}
  2087. PROCEDURE SetCRefCon(theControl: ControlHandle; data: LONGINT);
  2088.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2089.     INLINE $A95B;
  2090.     {$ENDC}
  2091. FUNCTION GetCRefCon(theControl: ControlHandle): LONGINT;
  2092.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2093.     INLINE $A95A;
  2094.     {$ENDC}
  2095. PROCEDURE SetCtlAction(theControl: ControlHandle; actionProc: ControlActionUPP);
  2096.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2097.     INLINE $A96B;
  2098.     {$ENDC}
  2099. FUNCTION GetCtlAction(theControl: ControlHandle): ControlActionUPP;
  2100.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2101.     INLINE $A96A;
  2102.     {$ENDC}
  2103. PROCEDURE SetCtlColor(theControl: ControlHandle; newColorTable: CCTabHandle);
  2104.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2105.     INLINE $AA43;
  2106.     {$ENDC}
  2107. FUNCTION GetCVariant(theControl: ControlHandle): INTEGER;
  2108.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  2109.     INLINE $A809;
  2110.     {$ENDC}
  2111. {$ENDC}  {OLDROUTINENAMES}
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119. {$ALIGN RESET}
  2120. {$POP}
  2121.  
  2122. {$SETC UsingIncludes := ControlsIncludes}
  2123.  
  2124. {$ENDC} {__CONTROLS__}
  2125.  
  2126. {$IFC NOT UsingIncludes}
  2127.  END.
  2128. {$ENDC}
  2129.